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 gdb]: Fix PR gdb/15161 part 1 of 3


Hi,

this patch fixes part one of the PR gdb/15161 issue in symfile.c.

ChangeLog

2013-02-19  Kai Tietz  <ktietz@redhat.com>

	PR gdb/15161
	* symfile.c (load_section_data): Change type of load_offset
	to CORE_ADDR.
	(generic_load): User strtoulst instead of strtoul for evalute of
	load_offset.

Ok for apply?

Regards,
Kai

Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.363
diff -p -u -r1.363 symfile.c
--- symfile.c	1 Feb 2013 19:39:03 -0000	1.363
+++ symfile.c	19 Feb 2013 16:52:32 -0000
@@ -1948,7 +1948,7 @@ add_section_size_callback (bfd *abfd, as

 /* Opaque data for load_section_callback.  */
 struct load_section_data {
-  unsigned long load_offset;
+  CORE_ADDR load_offset;
   struct load_progress_data *progress_data;
   VEC(memory_write_request_s) *requests;
 };
@@ -2126,9 +2126,9 @@ generic_load (char *args, int from_tty)

   if (argv[1] != NULL)
     {
-      char *endptr;
+      const char *endptr;

-      cbdata.load_offset = strtoul (argv[1], &endptr, 0);
+      cbdata.load_offset = (CORE_ADDR) strtoulst (argv[1], &endptr, 0);

       /* If the last word was not a valid number then
          treat it as a file name with spaces in.  */


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