* No useful backtrace in core dump.
@ 2010-04-22 2:41 代尔欣
2010-04-22 6:01 ` Baurzhan Ismagulov
2010-04-22 8:18 ` Mark Kettenis
0 siblings, 2 replies; 10+ messages in thread
From: 代尔欣 @ 2010-04-22 2:41 UTC (permalink / raw)
To: gdb
Hi list,
I'm new with gdb. Really need your help. I run gdb with my
program on ARM platform. I compiled the codes with -g option. After
the codes crash, in core dump file, I only see something like:
Raise()
Abort()
?? ()
Why no the last function called in my program? How to make this work,
Please help.
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: No useful backtrace in core dump.
2010-04-22 2:41 No useful backtrace in core dump 代尔欣
@ 2010-04-22 6:01 ` Baurzhan Ismagulov
2010-04-22 7:09 ` 代尔欣
2010-04-22 8:18 ` Mark Kettenis
1 sibling, 1 reply; 10+ messages in thread
From: Baurzhan Ismagulov @ 2010-04-22 6:01 UTC (permalink / raw)
To: gdb
On Thu, Apr 22, 2010 at 10:40:57AM +0800, 代尿¬£ wrote:
> After
> the codes crash, in core dump file, I only see something like:
>
> Raise()
> Abort()
> ?? ()
http://sources.redhat.com/ml/gdb/2008-08/msg00101.html
We ended up not using abort() where it was possible.
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No useful backtrace in core dump.
2010-04-22 6:01 ` Baurzhan Ismagulov
@ 2010-04-22 7:09 ` 代尔欣
0 siblings, 0 replies; 10+ messages in thread
From: 代尔欣 @ 2010-04-22 7:09 UTC (permalink / raw)
To: gdb
Baurzhan Ismagulov,
Many thanks your reply. I read the related thread. It seems
an abort() function problem. My program do not call abort() function.
I suppose some other place call abort() function(maybe in libc...). Or
abort signal also can lead this? Any other solution to fix this
instead change the abort() function call(because the abort() call may
place in other module and I can't or difficult modify).
Thank!
2010/4/22 Baurzhan Ismagulov <ibr@radix50.net>:
> On Thu, Apr 22, 2010 at 10:40:57AM +0800, 代尔欣 wrote:
>> After
>> the codes crash, in core dump file, I only see something like:
>>
>> Raise()
>> Abort()
>> ?? ()
>
> http://sources.redhat.com/ml/gdb/2008-08/msg00101.html
>
> We ended up not using abort() where it was possible.
>
> With kind regards,
> --
> Baurzhan Ismagulov
> http://www.kz-easy.com/
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No useful backtrace in core dump.
2010-04-22 2:41 No useful backtrace in core dump 代尔欣
2010-04-22 6:01 ` Baurzhan Ismagulov
@ 2010-04-22 8:18 ` Mark Kettenis
2010-04-22 8:35 ` 代尔欣
1 sibling, 1 reply; 10+ messages in thread
From: Mark Kettenis @ 2010-04-22 8:18 UTC (permalink / raw)
To: daierxin; +Cc: gdb
> Date: Thu, 22 Apr 2010 10:40:57 +0800
> From: =?GB2312?B?tPq2+9DA?= <daierxin@gmail.com>
>
> Hi list,
> I'm new with gdb. Really need your help. I run gdb with my
> program on ARM platform. I compiled the codes with -g option. After
> the codes crash, in core dump file, I only see something like:
>
> Raise()
> Abort()
> ?? ()
>
> Why no the last function called in my program? How to make this work,
> Please help.
Because GCC generates overoptimized code that destroys the call stack.
Please complain about this on the gcc mailing lists.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No useful backtrace in core dump.
2010-04-22 8:18 ` Mark Kettenis
@ 2010-04-22 8:35 ` 代尔欣
2010-04-22 8:50 ` Baurzhan Ismagulov
0 siblings, 1 reply; 10+ messages in thread
From: 代尔欣 @ 2010-04-22 8:35 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb
Hi Mark,
How about I use lower optimize option with GCC? If this still
can't work, I will follow your suggestion...
Thanks!
2010/4/22 Mark Kettenis <mark.kettenis@xs4all.nl>:
>> Date: Thu, 22 Apr 2010 10:40:57 +0800
>> From: =?GB2312?B?tPq2+9DA?= <daierxin@gmail.com>
>>
>> Hi list,
>> I'm new with gdb. Really need your help. I run gdb with my
>> program on ARM platform. I compiled the codes with -g option. After
>> the codes crash, in core dump file, I only see something like:
>>
>> Raise()
>> Abort()
>> ?? ()
>>
>> Why no the last function called in my program? How to make this work,
>> Please help.
>
> Because GCC generates overoptimized code that destroys the call stack.
> Please complain about this on the gcc mailing lists.
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: No useful backtrace in core dump.
2010-04-22 8:35 ` 代尔欣
@ 2010-04-22 8:50 ` Baurzhan Ismagulov
2010-04-22 9:02 ` 代尔欣
0 siblings, 1 reply; 10+ messages in thread
From: Baurzhan Ismagulov @ 2010-04-22 8:50 UTC (permalink / raw)
To: gdb
On Thu, Apr 22, 2010 at 04:35:41PM +0800, 代尿¬£ wrote:
> How about I use lower optimize option with GCC? If this still
> can't work, I will follow your suggestion...
IIUC, the thread implies that rebuilding glibc without
__attribute__((noreturn)) for abort() should solve the problem, but I
haven't tried that.
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: No useful backtrace in core dump.
2010-04-22 8:50 ` Baurzhan Ismagulov
@ 2010-04-22 9:02 ` 代尔欣
2010-04-22 9:17 ` Baurzhan Ismagulov
0 siblings, 1 reply; 10+ messages in thread
From: 代尔欣 @ 2010-04-22 9:02 UTC (permalink / raw)
To: gdb
http://sources.redhat.com/ml/gdb/2008-08/msg00123.html
From above thread:
Indeed, changing abort() to invalid memory reference makes backtrace work.
foo (int a, int b)
{
int c=40;
abort(); <--- IIUC, change to invalid memory reference
return a+b;
}
I don't know whether can remove the __attribute__((noreturn)) or not
when compiling glibc. It seems the problem a little complicated....
2010/4/22 Baurzhan Ismagulov <ibr@radix50.net>:
> On Thu, Apr 22, 2010 at 04:35:41PM +0800, 代尔欣 wrote:
>> How about I use lower optimize option with GCC? If this still
>> can't work, I will follow your suggestion...
>
> IIUC, the thread implies that rebuilding glibc without
> __attribute__((noreturn)) for abort() should solve the problem, but I
> haven't tried that.
>
> With kind regards,
> --
> Baurzhan Ismagulov
> http://www.kz-easy.com/
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: No useful backtrace in core dump.
2010-04-22 9:02 ` 代尔欣
@ 2010-04-22 9:17 ` Baurzhan Ismagulov
2010-04-22 9:36 ` 代尔欣
0 siblings, 1 reply; 10+ messages in thread
From: Baurzhan Ismagulov @ 2010-04-22 9:17 UTC (permalink / raw)
To: gdb
On Thu, Apr 22, 2010 at 05:02:10PM +0800, 代尿¬£ wrote:
> http://sources.redhat.com/ml/gdb/2008-08/msg00123.html
> From above thread:
> Indeed, changing abort() to invalid memory reference makes backtrace work.
> foo (int a, int b)
> {
> int c=40;
> abort(); <--- IIUC, change to invalid memory reference
> return a+b;
> }
This is basically refraining from using abort(), which you said could be
difficult for you to modify, especially since you don't know yet who
calls it.
As the first step, I'd run the app under gdb / gdbserver to find out the
caller.
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: No useful backtrace in core dump.
2010-04-22 9:17 ` Baurzhan Ismagulov
@ 2010-04-22 9:36 ` 代尔欣
2010-04-22 9:44 ` Baurzhan Ismagulov
0 siblings, 1 reply; 10+ messages in thread
From: 代尔欣 @ 2010-04-22 9:36 UTC (permalink / raw)
To: gdb
Baurzhan Ismagulov,
Thanks your valuable reply. I will try find who call abort(). Hope
I do not go wrong direction.
Thanks!
2010/4/22 Baurzhan Ismagulov <ibr@radix50.net>:
> On Thu, Apr 22, 2010 at 05:02:10PM +0800, 代尔欣 wrote:
>> http://sources.redhat.com/ml/gdb/2008-08/msg00123.html
>> From above thread:
>> Indeed, changing abort() to invalid memory reference makes backtrace work.
>> foo (int a, int b)
>> {
>> int c=40;
>> abort(); <--- IIUC, change to invalid memory reference
>> return a+b;
>> }
>
> This is basically refraining from using abort(), which you said could be
> difficult for you to modify, especially since you don't know yet who
> calls it.
>
> As the first step, I'd run the app under gdb / gdbserver to find out the
> caller.
>
> With kind regards,
> --
> Baurzhan Ismagulov
> http://www.kz-easy.com/
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: No useful backtrace in core dump.
2010-04-22 9:36 ` 代尔欣
@ 2010-04-22 9:44 ` Baurzhan Ismagulov
0 siblings, 0 replies; 10+ messages in thread
From: Baurzhan Ismagulov @ 2010-04-22 9:44 UTC (permalink / raw)
To: gdb
On Thu, Apr 22, 2010 at 05:36:46PM +0800, 代尿¬£ wrote:
> Hope I do not go wrong direction.
This depends on your goal, whether you want to debug this particular
case, or you want to solve the backtrace problem in general.
If you can reproduce the problem, then running the app under gdb is the
easiest way. Otherwise, you could analyze the stack in the core file
manually and see callers past abort().
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-04-22 9:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-22 2:41 No useful backtrace in core dump 代尔欣
2010-04-22 6:01 ` Baurzhan Ismagulov
2010-04-22 7:09 ` 代尔欣
2010-04-22 8:18 ` Mark Kettenis
2010-04-22 8:35 ` 代尔欣
2010-04-22 8:50 ` Baurzhan Ismagulov
2010-04-22 9:02 ` 代尔欣
2010-04-22 9:17 ` Baurzhan Ismagulov
2010-04-22 9:36 ` 代尔欣
2010-04-22 9:44 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox