2006-04-14 05:52:53 +00:00
|
|
|
|
2005-12-14 Jeff Johnston <jjohnstn@redhat.com>
|
|
|
|
|
|
|
|
|
|
* symfile-mem.c (read_memory): New static read callback function.
|
|
|
|
|
(symfile_add_from_memory): Pass read_memory to bfd instead of
|
|
|
|
|
target_read_memory.
|
|
|
|
|
* target.c (target_xfer_memory): Add support for LONGEST len and
|
|
|
|
|
change all callers.
|
|
|
|
|
(deprecated_debug_xfer_memory, target_read_memory): Ditto.
|
|
|
|
|
(target_write_memory, do_xfer_memory): Ditto.
|
|
|
|
|
(target_xfer_memory_partial, target_read_memory_partial): Ditto.
|
|
|
|
|
(target_write_memory_partial): Ditto.
|
|
|
|
|
* infptrace.c (child_xfer_memory): Ditto.
|
|
|
|
|
* linux-nat.c (linux_nat_xfer_memory): Ditto.
|
|
|
|
|
(linux_nat_proc_xfer_memory): Ditto.
|
|
|
|
|
* dcache.c (dcache_xfer_memory): Ditto.
|
|
|
|
|
* exec.c (xfer_memory): Ditto.
|
|
|
|
|
* remote.c (remote_xfer_memory): Ditto.
|
|
|
|
|
* remote-sim.c (gdbsim_xfer_interior_memory): Ditto.
|
|
|
|
|
* target.h: Change prototypes for functions changed above.
|
|
|
|
|
* linux-nat.h: Ditto.
|
|
|
|
|
* remote.h: Ditto.
|
|
|
|
|
* dcache.h: Ditto.
|
|
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
|
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
Port to GDB-6.7.
|
|
|
|
|
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/symfile-mem.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/symfile-mem.c 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -57,6 +57,14 @@
|
2006-04-14 05:52:53 +00:00
|
|
|
|
#include "elf/common.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+/* Local callback routine to pass to bfd to read from target memory,
|
|
|
|
|
+ using a len constrained to INT_MAX. */
|
|
|
|
|
+static int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
+read_target_memory (bfd_vma addr, bfd_byte *buf, int len)
|
2006-04-14 05:52:53 +00:00
|
|
|
|
+{
|
|
|
|
|
+ return target_read_memory (addr, buf, (LONGEST)len);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
/* Read inferior memory at ADDR to find the header of a loaded object file
|
|
|
|
|
and read its in-core symbols out of inferior memory. TEMPL is a bfd
|
2006-07-11 06:33:02 +00:00
|
|
|
|
representing the target's format. NAME is the name to use for this
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -77,7 +85,7 @@ symbol_file_add_from_memory (struct bfd
|
2006-07-11 06:33:02 +00:00
|
|
|
|
error (_("add-symbol-file-from-memory not supported for this target"));
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
|
|
|
|
|
- target_read_memory);
|
|
|
|
|
+ read_target_memory);
|
|
|
|
|
if (nbfd == NULL)
|
2006-07-11 06:33:02 +00:00
|
|
|
|
error (_("Failed to read a valid object file image from memory."));
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/target.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/target.c 2010-01-15 03:22:13.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/target.c 2010-01-15 03:22:23.000000000 +0100
|
2009-08-04 05:37:29 +00:00
|
|
|
|
@@ -59,7 +59,7 @@ static int nosymbol (char *, CORE_ADDR *
|
2007-01-21 01:53:01 +00:00
|
|
|
|
|
|
|
|
|
static void tcomplain (void) ATTR_NORETURN;
|
|
|
|
|
|
|
|
|
|
-static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
|
|
|
|
+static LONGEST nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
|
|
|
|
|
|
|
|
|
static int return_zero (void);
|
|
|
|
|
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -494,7 +494,7 @@ target_terminal_inferior (void)
|
2009-08-04 05:37:29 +00:00
|
|
|
|
(*current_target.to_terminal_inferior) ();
|
2007-01-21 01:53:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-static int
|
|
|
|
|
+static LONGEST
|
|
|
|
|
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
|
|
|
|
struct target_ops *t)
|
|
|
|
|
{
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -726,7 +726,7 @@ update_current_target (void)
|
2007-11-01 20:24:20 +00:00
|
|
|
|
(void (*) (struct regcache *))
|
2006-04-14 05:52:53 +00:00
|
|
|
|
noprocess);
|
2007-01-21 01:53:01 +00:00
|
|
|
|
de_fault (deprecated_xfer_memory,
|
|
|
|
|
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
|
2006-07-11 06:33:02 +00:00
|
|
|
|
+ (LONGEST (*) (CORE_ADDR, gdb_byte *, LONGEST, int, struct mem_attrib *, struct target_ops *))
|
2006-04-14 05:52:53 +00:00
|
|
|
|
nomemory);
|
2007-01-21 01:53:01 +00:00
|
|
|
|
de_fault (to_files_info,
|
|
|
|
|
(void (*) (struct target_ops *))
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -1497,7 +1497,7 @@ target_xfer_partial (struct target_ops *
|
2007-01-21 01:53:01 +00:00
|
|
|
|
it makes no progress, and then return how much was transferred). */
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
|
|
|
|
|
+target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
|
2006-04-14 05:52:53 +00:00
|
|
|
|
{
|
2009-08-04 05:37:29 +00:00
|
|
|
|
/* Dispatch to the topmost target, not the flattened current_target.
|
|
|
|
|
Memory accesses check target->to_has_(all_)memory, and the
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -1513,7 +1513,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
2009-09-10 21:37:41 +00:00
|
|
|
|
the target's stack. This may trigger different cache behavior. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
-target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
|
|
|
|
|
+target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
|
|
|
|
|
{
|
|
|
|
|
/* Dispatch to the topmost target, not the flattened current_target.
|
|
|
|
|
Memory accesses check target->to_has_(all_)memory, and the
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -1532,7 +1532,7 @@ target_read_stack (CORE_ADDR memaddr, gd
|
|
|
|
|
Callers that can deal with partial writes should call target_write. */
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
|
|
|
|
|
+target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, LONGEST len)
|
2006-04-14 05:52:53 +00:00
|
|
|
|
{
|
2009-08-04 05:37:29 +00:00
|
|
|
|
/* Dispatch to the topmost target, not the flattened current_target.
|
|
|
|
|
Memory accesses check target->to_has_(all_)memory, and the
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -3098,8 +3098,8 @@ debug_to_prepare_to_store (struct regcac
|
2006-04-14 05:52:53 +00:00
|
|
|
|
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-static int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
+static LONGEST
|
2006-07-11 06:33:02 +00:00
|
|
|
|
+deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, LONGEST len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
int write, struct mem_attrib *attrib,
|
|
|
|
|
struct target_ops *target)
|
|
|
|
|
{
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -3109,8 +3109,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
2006-04-14 05:52:53 +00:00
|
|
|
|
attrib, target);
|
|
|
|
|
|
|
|
|
|
fprintf_unfiltered (gdb_stdlog,
|
2009-02-11 00:04:48 +00:00
|
|
|
|
- "target_xfer_memory (%s, xxx, %d, %s, xxx) = %d",
|
2009-08-04 05:37:29 +00:00
|
|
|
|
- paddress (target_gdbarch, memaddr), len,
|
2009-02-11 00:04:48 +00:00
|
|
|
|
+ "target_xfer_memory (%s, xxx, %ld, %s, xxx) = %d",
|
2009-08-04 05:37:29 +00:00
|
|
|
|
+ paddress (target_gdbarch, memaddr), (long) len,
|
|
|
|
|
write ? "write" : "read", retval);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
if (retval > 0)
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/target.h
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/target.h 2010-01-15 03:22:13.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/target.h 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -406,10 +406,10 @@ struct target_ops
|
2006-04-14 05:52:53 +00:00
|
|
|
|
NOTE: cagney/2004-10-01: This has been entirely superseeded by
|
|
|
|
|
to_xfer_partial and inferior inheritance. */
|
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
|
- int (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
- int len, int write,
|
2006-07-11 06:33:02 +00:00
|
|
|
|
- struct mem_attrib *attrib,
|
|
|
|
|
- struct target_ops *target);
|
|
|
|
|
+ LONGEST (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
|
|
|
+ LONGEST len, int write,
|
|
|
|
|
+ struct mem_attrib *attrib,
|
|
|
|
|
+ struct target_ops *target);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
|
void (*to_files_info) (struct target_ops *);
|
2009-08-04 05:37:29 +00:00
|
|
|
|
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -786,12 +786,12 @@ extern void target_dcache_invalidate (vo
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
2009-08-04 05:37:29 +00:00
|
|
|
|
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2009-09-10 21:37:41 +00:00
|
|
|
|
-extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
|
|
|
|
+extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
|
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
|
extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
|
|
|
|
|
- int len);
|
|
|
|
|
+ LONGEST len);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2007-01-21 01:53:01 +00:00
|
|
|
|
/* Fetches the target's memory map. If one is found it is sorted
|
|
|
|
|
and returned, after some consistency checking. Otherwise, NULL
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/dcache.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/dcache.c 2010-01-01 08:31:30.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/dcache.c 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -468,10 +468,10 @@ dcache_free (DCACHE *dcache)
|
|
|
|
|
NOTE: This is different than the to_xfer_partial interface, in which
|
|
|
|
|
positive values less than LEN mean further transfers may be possible. */
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
-int
|
|
|
|
|
+LONGEST
|
2009-09-10 21:37:41 +00:00
|
|
|
|
dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache,
|
|
|
|
|
CORE_ADDR memaddr, gdb_byte *myaddr,
|
2006-07-11 06:33:02 +00:00
|
|
|
|
- int len, int should_write)
|
2006-04-14 05:52:53 +00:00
|
|
|
|
+ LONGEST len, int should_write)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
2009-09-10 21:37:41 +00:00
|
|
|
|
int res;
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/dcache.h
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/dcache.h 2010-01-15 03:22:23.000000000 +0100
|
2009-09-10 21:37:41 +00:00
|
|
|
|
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
/* Simple to call from <remote>_xfer_memory */
|
|
|
|
|
|
2009-09-10 21:37:41 +00:00
|
|
|
|
-int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
|
|
|
|
|
- gdb_byte *my, int len, int should_write);
|
|
|
|
|
+LONGEST dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
|
|
|
|
|
+ gdb_byte *my, LONGEST len, int should_write);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2009-09-10 21:37:41 +00:00
|
|
|
|
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
|
|
|
int len);
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/exec.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/exec.c 2010-01-14 22:01:24.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/exec.c 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -578,7 +578,7 @@ map_vmap (bfd *abfd, bfd *arch)
|
2009-08-04 05:37:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
-int
|
|
|
|
|
+LONGEST
|
2009-08-04 05:37:29 +00:00
|
|
|
|
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
|
|
|
|
ULONGEST offset, LONGEST len,
|
|
|
|
|
struct target_section *sections,
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:14.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -5117,7 +5117,7 @@ linux_xfer_partial (struct target_ops *o
|
2009-03-02 00:11:35 +00:00
|
|
|
|
#endif
|
2006-07-11 06:33:02 +00:00
|
|
|
|
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
|
|
|
|
{ /* This region contains ia64 rse registers, we have to re-read. */
|
|
|
|
|
- int xxfer;
|
|
|
|
|
+ LONGEST xxfer;
|
|
|
|
|
|
|
|
|
|
/* Re-read register stack area. */
|
|
|
|
|
xxfer = super_xfer_partial (ops, object, annex,
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/remote.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/remote.c 2010-01-12 22:40:24.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/remote.c 2010-01-15 03:22:23.000000000 +0100
|
2007-11-01 20:24:20 +00:00
|
|
|
|
@@ -25,6 +25,7 @@
|
2006-04-14 05:52:53 +00:00
|
|
|
|
#include "gdb_string.h"
|
|
|
|
|
#include <ctype.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
+#include <limits.h>
|
|
|
|
|
#include "inferior.h"
|
|
|
|
|
#include "bfd.h"
|
|
|
|
|
#include "symfile.h"
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -6175,12 +6176,19 @@ handle_notification (char *buf, size_t l
|
2006-07-11 06:33:02 +00:00
|
|
|
|
if SHOULD_WRITE is nonzero. Returns length of data written or
|
|
|
|
|
read; 0 for error. TARGET is unused. */
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
-static int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
+static LONGEST
|
2006-07-11 06:33:02 +00:00
|
|
|
|
+remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, LONGEST mem_len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
int should_write, struct mem_attrib *attrib,
|
|
|
|
|
struct target_ops *target)
|
|
|
|
|
{
|
|
|
|
|
int res;
|
|
|
|
|
+ int len;
|
|
|
|
|
+
|
|
|
|
|
+ /* This routine is not set up to handle > INT_MAX bytes. */
|
|
|
|
|
+ if (mem_len >= (LONGEST)INT_MAX)
|
|
|
|
|
+ return 0;
|
|
|
|
|
+
|
|
|
|
|
+ len = (int)mem_len;
|
|
|
|
|
|
2008-12-14 14:05:20 +00:00
|
|
|
|
set_general_thread (inferior_ptid);
|
|
|
|
|
|
2010-01-16 22:32:10 +00:00
|
|
|
|
@@ -6189,7 +6197,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
else
|
2007-01-21 01:53:01 +00:00
|
|
|
|
res = remote_read_bytes (mem_addr, buffer, mem_len);
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
- return res;
|
|
|
|
|
+ return (LONGEST)res;
|
|
|
|
|
}
|
|
|
|
|
|
2007-01-21 01:53:01 +00:00
|
|
|
|
/* Sends a packet with content determined by the printf format string
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/remote-sim.c
|
2006-07-11 06:33:02 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/remote-sim.c 2010-01-01 08:31:40.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/remote-sim.c 2010-01-15 03:22:23.000000000 +0100
|
2009-08-04 05:37:29 +00:00
|
|
|
|
@@ -752,11 +752,14 @@ gdbsim_prepare_to_store (struct regcache
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
|
|
|
|
Returns the number of bytes transferred. */
|
|
|
|
|
|
|
|
|
|
-static int
|
2006-07-11 06:33:02 +00:00
|
|
|
|
-gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
+static LONGEST
|
2006-07-11 06:33:02 +00:00
|
|
|
|
+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len,
|
2006-04-14 05:52:53 +00:00
|
|
|
|
int write, struct mem_attrib *attrib,
|
|
|
|
|
struct target_ops *target)
|
|
|
|
|
{
|
|
|
|
|
+ /* Convert to len type that sim_read and sim_write can handle. */
|
|
|
|
|
+ int xfer_len = (int)len;
|
|
|
|
|
+
|
2007-01-21 01:53:01 +00:00
|
|
|
|
/* If no program is running yet, then ignore the simulator for
|
|
|
|
|
memory. Pass the request down to the next target, hopefully
|
|
|
|
|
an exec file. */
|
2010-01-16 22:32:10 +00:00
|
|
|
|
Index: gdb-7.0.50.20100115/gdb/exec.h
|
2009-08-04 05:37:29 +00:00
|
|
|
|
===================================================================
|
2010-01-16 22:32:10 +00:00
|
|
|
|
--- gdb-7.0.50.20100115.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100
|
|
|
|
|
+++ gdb-7.0.50.20100115/gdb/exec.h 2010-01-15 03:22:23.000000000 +0100
|
|
|
|
|
@@ -60,7 +60,7 @@ extern int resize_section_table (struct
|
2009-08-04 05:37:29 +00:00
|
|
|
|
|
|
|
|
|
One, and only one, of readbuf or writebuf must be non-NULL. */
|
2006-04-14 05:52:53 +00:00
|
|
|
|
|
2009-08-04 05:37:29 +00:00
|
|
|
|
-extern int section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
|
|
|
|
|
+extern LONGEST section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
|
|
|
|
|
ULONGEST, LONGEST,
|
|
|
|
|
struct target_section *,
|
|
|
|
|
struct target_section *,
|