[SWLUG] how hard can it be... to get a core dump

Neil Greenwood neil.greenwood.lug at gmail.com
Thu Sep 25 13:23:11 UTC 2008


2008/9/25 Mark Summerfield <mark at qtrac.eu>:
> On 2008-09-25, Justin Mitchell wrote:
>> the other way of course is to not core dump at all, but run the program
>> from within gdb, so it drops straight to the debugger when it crashes.
>>
>> 'gdb ./myprogram'
>> then 'run' followed by any command line args your program needs
>
> I tried that.
>
> But programA runs programB and the crash only occurs in programB when it
> is run from programA (with a particular data set); it runs fine on its
> own or with other data. Inside gdb the crash occurs and a return value
> of 01 is noted; but the backtrace gives me nothing, presumably because
> gdb is debugging programA rather than the programB that crashed "inside"
> it.

Can you change the command-line that programA uses to run programB? If
so, you could change that to run 'gdb programB'?

Sorry, I'm not a C programmer, so I might be completely off track.
Just thought a little bit of lateral thinking might help...


Hwyl,
Neil.



More information about the Swlug mailing list