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]

[PATCH] ia64-tdep.c: Fix internal error from ``maintenance print architecture''


Committed per conversation with Kevin Buettner, see below.

2002-03-16  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>

	* ia64-tdep.c (ia64_gdbarch_init): Call set_gdbarch_frame_args_skip,
	to fix internal_error from ``maintenance print architecture''.


--- ./ia64-tdep.c.orig	Sat Mar  2 11:23:57 2002
+++ ./ia64-tdep.c	Fri Mar 15 15:49:43 2002
@@ -2223,6 +2223,7 @@ ia64_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_function_start_offset (gdbarch, 0);
+  set_gdbarch_frame_args_skip (gdbarch, 0);
 
   set_gdbarch_remote_translate_xfer_address (
     gdbarch, ia64_remote_translate_xfer_address);


: On Mar 15,  7:06pm, Peter.Schauer wrote:
: 
: > While testing a GDB crossbuild on a powerpc-ibm-aix4.3.3.0 host with
: > --target=ia64-linux, I did a
: > maint print arch
: > in the resulting GDB, which triggered the following internal_error in
: > gdbarch.c:
: > 
: >   if (gdbarch->frame_args_skip == -1)
: >     internal_error (__FILE__, __LINE__,
: >                     "gdbarch: gdbarch_frame_args_skip invalid");
: > 
: > The problem also happens when I build a ia64-linux cross GDB on a i386
: > Linux machine.
: > I do not have access to a ia64-linux machine, but I don't understand why
: > it wouldn't happen there as well.
: 
: Actually, I think it does.  (I'd check, but my power-thirsty IA-64
: machines are turned off right now.)
: 
: > Here is a patch, which avoids the assertion, but I am not sure if it is
: > correct:
: > 
: > --- ./ia64-tdep.c.orig	Sat Mar  2 11:23:57 2002
: > +++ ./ia64-tdep.c	Fri Mar 15 15:49:43 2002
: > @@ -2223,6 +2223,7 @@ ia64_gdbarch_init (struct gdbarch_info i
: >  
: >    set_gdbarch_decr_pc_after_break (gdbarch, 0);
: >    set_gdbarch_function_start_offset (gdbarch, 0);
: > +  set_gdbarch_frame_args_skip (gdbarch, 0);
: >  
: >    set_gdbarch_remote_translate_xfer_address (
: >      gdbarch, ia64_remote_translate_xfer_address);
: > 
: 
: I think this is okay.  The only place where FRAME_ARGS_SKIP is used is in
: print_frame_args() when num != -1.  However, num will always be -1 since
: ia64-tdep.c uses frame_num_args_unknown for FRAME_NUM_ARGS (which is how
: ``num'' gets its value.)
: 
: Go ahead and commit this change.
: 
: Thanks!
: 
: Kevin

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de


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