This is the mail archive of the gdb@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: dwarf2-frame.c question for maintainers


   Date: Wed, 14 Jul 2004 15:28:49 -0400
   From: Andrew Cagney <cagney@gnu.org>

   >>> How come extract_typed_address, in read_reg, doesn't sign extend?
   > 
   > 
   > I should have explained that. It does.  However extract_typed_address is
   > incorrect because it makes the invalid assumption that sizeof(address)
   > == sizeof(register).  So that has to go and be replaced with something
   > like
   > extract_signed_integer (buf, register_size (current_gdbarch, regnum));

Martin, not all the world's a MIPS.  Sign-extension is wrong here for
most targets.

   You mean the builtin_type_void_data_ptr parameter to 
   extract_typed_address?  Ah.

   I see builtin_type_void_data_ptr dates back to 1.1 (Mark?).  It could 
   instead use the register's type?

Nope.  extract_typed_address only accepts a pointer type, and there's
no guarantee that the register's type is a pointer type.

Mark


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