I originally started writing wxFile class and wxSeek functions, As that was crashing, I wanted to do away with it and use plain lseek. Even now I want get around the problem and want to call lseek function. Is there any way to do that? As the function is not reaching lseek at all in this case, there has to be some problem in compiling the code. So, how do I get rid of that?
I am not conversant with coredump, but I think this is a very complicated way to discover a bug in the library, as wxWidgets should clarify/correct it. |
if you have a simple case just report it to the developers, you do not need to analyze or solve it. However the stack trace may give a lot of info about the problem.
So if you want to solve this I recommend you to make a library without wxWidgets and this implements your file i/o (you can also try to link statically the runtime). You will use this lib in your app with wxWidgets instead of the original runtime (so you will have my_lseek, my_open or similar) |
Quote:
use dlopen Code:
handler = dlopen("libc.so.6", ...); But this (assembler) function shoul be changed for each new processor or operation system So first solution is more portable |
Thank you for the help. I reported the issue to the developers but have not got their response yet. But the solution:
handler = dlopen("libc.so.6", ...); true_lseek = dlsym(handler, "lseek"); true_lseek(....); is the one probably I was looking for. It seems to work fine, at least the core dump is gone. I would say the issue is solved. |
Quote:
|
Quote:
|
I have just completed lseek and write on a block device and verified. So, it works, but not with wxWidget, but by using dlopen and dlsym.
|
All times are GMT -5. The time now is 06:34 PM. |