RFA: ia64 patch required after recent osabi changes

J. Johnston jjohnstn@redhat.com
Wed Nov 5 20:34:00 GMT 2003


Kevin Buettner wrote:
> On Nov 4,  7:04pm, J. Johnston wrote:
> 
> 
>>The latest changes by Mark K. have caused regressions in the ia64 signal handler 
>>back-tracing.  What happens is that the ia64_gdbarch_init function is called 
>>without a bfd to calculate the os_ident field.  The os_ident field is later used 
>>to set up the gdbarch_tdep structure which contains the sigcontext register 
>>address function address.  We end up with an os_ident of -1 and don't set up the 
>>sigcontext register address function pointing to the ia64-linux-tdep.c function. 
>>  This kills backtracing across signal handlers because we can't figure out the 
>>previous ip value without fishing it out of the sigcontext area.
>>
>>After discussing this with Andrew, it appears the ia64 code is a bit old.  The 
>>info.osabi field is set properly so we don't have to calculate the os_ident. 
>>This patch removes the gdbarch_tdep os_ident field and uses instead the 
>>info.osabi field in ia64_gdbarch_init.  It also copies code from i386 which 
>>looks for a gdbarch candidate.  This code is much more efficient than the old code.
>>
>>With this patch, the ia64 signal backtracing works again and there are no 
>>regressions in the testsuite.
>>
>>Ok to commit?
>>
>>-- Jeff J.
>>
>>2003-11-04  Jeff Johnston  <jjohnstn@redhat.com>
>>
>>	* ia64-tdep.c (struct gdbarch_tdep): Remove os_ident field.
>>	(ia64_gdbarch_init): Don't bother calculating the os.  Instead use the 
>>gdbarch_info struct and look at the osabi field.  Also use           		 
>>gdbarch_list_lookup_by_info() to look for a candidate gdbarch.
> 
> 
> Approved.  (But watch the line lengths on your ChangeLog entry when you
> check it in...)
> 

Don't worry, I always do.  I had problems with line wrapping when I entered it.

Patch checked in.  This fixes the regression with the new osabi code and ia64 
signal handling backtrace without having to remove the assertion.

-- Jeff J.



More information about the Gdb-patches mailing list