This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Infinite backtraces...


> >     #0  simple.break_me () at simple.adb:27
> >     #1  0x0000a2cc in simple.caller (<_task>=0x4001c3a0) at simple.adb:21
> >     #2  0x0000a268 in simple__callerB___2 () at simple.adb:18
> >     #3  0x00017184 in system.tasking.stages.task_wrapper ()
> >     #4  0x00017058 in system__tasking__stages__task_wrapper ()
> >     #5  0x7aee0f60 in __pthread_create_system () from /usr/lib/libpthread.1
> >     #6  0x7aee0f08 in __pthread_create_system () from /usr/lib/libpthread.1
> >     #7  0x00000000 in ?? ()
> > 
> > Imagine we are at frame #6, and try to go up one frame. So what happens
> > is that we compute the ID of frame #6, and then, assuming all the sanity
> > checks are ok, create frame #7.
> > 
> > What you are suggesting is that we return a null frame ID for frame
> > #6, correct? What I thought you were saying is that we return a null
> > frame ID for frame *7*, which of course should never exist.
> 
> I'd suggest that you return a null frame ID from frame *5* actually.
> Is there a reason not to do that?  Certainly a bit of caution is called
> for, but if GDB has the knowledge that a particular bit of code can
> never be backtraced through...

Do you mean by checking the procedure name against "__pthread_create_system"?
This should certainly be very easy to do. This is, on the other hand,
OS specific. So this check should only be made when the OS is HPUX.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]