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]

[RFC] Accomodate 64-bit msymbols in expressions


The following change is motivated by the fact that the addresses of
minimal symbols currently get truncated to 32 bits in expressions.

Does this look badly wrong to anybody?
2001-02-16  Michael Snyder  <msnyder@mvstp600e.cygnus.com>

	* parse.c (write_exp_msymbol): Make the type (long long), to 
	accomodate 64-bit addresses.

Index: parse.c
===================================================================
RCS file: /cvs/src/src/gdb/parse.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 parse.c
*** parse.c	2000/12/15 01:01:48	1.11
--- parse.c	2001/02/16 23:59:30
*************** static struct type *msym_data_symbol_typ
*** 403,415 ****
  static struct type *msym_unknown_symbol_type;
  
  void
! write_exp_msymbol (struct minimal_symbol *msymbol,
! 		   struct type *text_symbol_type, struct type *data_symbol_type)
  {
    CORE_ADDR addr;
  
    write_exp_elt_opcode (OP_LONG);
!   write_exp_elt_type (lookup_pointer_type (builtin_type_void));
  
    addr = SYMBOL_VALUE_ADDRESS (msymbol);
    if (overlay_debugging)
--- 403,417 ----
  static struct type *msym_unknown_symbol_type;
  
  void
! write_exp_msymbol (struct minimal_symbol *msymbol, 
! 		   struct type *text_symbol_type, 
! 		   struct type *data_symbol_type)
  {
    CORE_ADDR addr;
  
    write_exp_elt_opcode (OP_LONG);
!   /* Let's make the type big enough to hold a 64-bit address.  */
!   write_exp_elt_type (builtin_type_long_long);
  
    addr = SYMBOL_VALUE_ADDRESS (msymbol);
    if (overlay_debugging)

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