This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Changing size of c_value in xcoffread.c to accomodate XCOFF 64BIT
- From: Raunaq 12 <raunaq12 at in dot ibm dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: brobecker at adacore dot com, gdb-patches at sourceware dot org, palves at redhat dot com (Pedro Alves), tromey at redhat dot com
- Date: Wed, 18 Sep 2013 14:56:13 +0530
- Subject: [PATCH] Changing size of c_value in xcoffread.c to accomodate XCOFF 64BIT
- Authentication-results: sourceware.org; auth=none
- References: <OFF1AD3B4E dot E38F5E08-ON65257BE9 dot 002880DA-65257BE9 dot 0035DBE4 at in dot ibm dot com> from "Raunaq 12" at Sep 17, 2013 03:16:49 PM <201309171333 dot r8HDX0dL006584 at d06av02 dot portsmouth dot uk dot ibm dot com>
> > 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