This is the mail archive of the gdb-patches@sourceware.org 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] Changing size of c_value in xcoffread.c to accomodate XCOFF 64BIT



> > Yes, I did not account for such a scenario. Changing the size of
> > cs->c_value to 'long long' will suffice ?
>
> I think it really needs to be CORE_ADDR.  Note that "long long" shouldn't
> be used in common code since on some systems / compilers this data type
> isn't even available ...

Oh alright, assigning it to CORE_ADDR itself, thanks.
This okay to check in ?

ChangeLog-
		 		  * xcoffread.c : Make coff_symbol->c_value
				  large enough to hold 64-bit address.
				  (read_xcoff_symtab): Make fcn_start_addr
				  large enough to hold 64-bit address.
---
Index: ./gdb/xcoffread.c
===================================================================
--- ./gdb.orig/xcoffread.c
+++ ./gdb/xcoffread.c
@@ -95,7 +95,7 @@
     char *c_name;
     int c_symnum;              /* Symbol number of this entry.  */
     int c_naux;                /* 0 if syment only, 1 if syment + auxent.
*/
-    long c_value;
+    CORE_ADDR c_value;
     unsigned char c_sclass;
     int c_secnum;
     unsigned int c_type;
@@ -1034,7 +1036,7 @@
   unsigned int max_symnum;
   int just_started = 1;
   int depth = 0;
-  int fcn_start_addr = 0;
+  CORE_ADDR fcn_start_addr = 0;

   struct coff_symbol fcn_stab_saved = { 0 };

---

Thanks,
Raunaq


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