Add strace debugging section.
This commit is contained in:
parent
5088b18431
commit
a9ae96dde4
@ -71,3 +71,26 @@ c:\some\path\bad_program.exe some parameters
|
||||
To do it, just add --enable-malloc-debugging option to configure. Be warned,
|
||||
however, that this version of dll is _very_ slow (10-100 times slower than
|
||||
normal), so use it only when absolutely necessary.
|
||||
|
||||
7. Program dies when running under strace.
|
||||
If your program crashes when you run it using strace but runs ok (or has a
|
||||
different problem) otherwise, then there may be a problem in one of the
|
||||
strace *_printf statements. Usually this is caused by a change in arguments
|
||||
resulting in a %s being used with something other than a pointer to a
|
||||
string.
|
||||
|
||||
To debug this scenario, do something like this:
|
||||
|
||||
bash$ gdb -nw yourapp.exe
|
||||
(gdb) dll cygwin1
|
||||
(gdb) l dll_crt0_1
|
||||
(gdb) bp <<first line in the function>>
|
||||
(gdb) run
|
||||
(gdb) set strace.active=1
|
||||
(gdb) continue
|
||||
|
||||
The program will then run in "strace mode", calling each strace *_printf,
|
||||
just like it does when run under the strace program. Eventually, the
|
||||
program will crash, probably in small_printf. At that point, a 'bt'
|
||||
command should show you the offending call to strace_printf with the
|
||||
improper format string.
|
||||
|
Loading…
Reference in New Issue
Block a user