diff --git a/gdb-6.3-large-core-20051206.patch b/gdb-6.3-large-core-20051206.patch deleted file mode 100644 index 3be746a..0000000 --- a/gdb-6.3-large-core-20051206.patch +++ /dev/null @@ -1,304 +0,0 @@ -2005-12-14 Jeff Johnston - - * 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-10-15 Jan Kratochvil - - Port to GDB-6.7. - -Index: gdb-7.2.50.20101116/gdb/symfile-mem.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/symfile-mem.c 2010-11-16 08:00:37.000000000 +0100 -@@ -57,6 +57,14 @@ - #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 -+read_target_memory (bfd_vma addr, bfd_byte *buf, int len) -+{ -+ 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 - representing the target's format. NAME is the name to use for this -@@ -77,7 +85,7 @@ symbol_file_add_from_memory (struct bfd - error (_("add-symbol-file-from-memory not supported for this target")); - - nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase, -- target_read_memory); -+ read_target_memory); - if (nbfd == NULL) - error (_("Failed to read a valid object file image from memory.")); - -Index: gdb-7.2.50.20101116/gdb/target.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/target.c 2010-11-16 07:53:59.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/target.c 2010-11-16 08:00:37.000000000 +0100 -@@ -58,7 +58,7 @@ static int nosymbol (char *, CORE_ADDR * - - static void tcomplain (void) ATTRIBUTE_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); - -@@ -513,7 +513,7 @@ target_terminal_inferior (void) - (*current_target.to_terminal_inferior) (); - } - --static int -+static LONGEST - nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, - struct target_ops *t) - { -@@ -718,7 +718,7 @@ update_current_target (void) - (void (*) (struct regcache *)) - noprocess); - de_fault (deprecated_xfer_memory, -- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *)) -+ (LONGEST (*) (CORE_ADDR, gdb_byte *, LONGEST, int, struct mem_attrib *, struct target_ops *)) - nomemory); - de_fault (to_files_info, - (void (*) (struct target_ops *)) -@@ -1550,7 +1550,7 @@ target_xfer_partial (struct target_ops * - it makes no progress, and then return how much was transferred). */ - - int --target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len) -+target_read_memory (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 -@@ -1566,7 +1566,7 @@ target_read_memory (CORE_ADDR memaddr, g - 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 -@@ -1585,7 +1585,7 @@ target_read_stack (CORE_ADDR memaddr, gd - Callers that can deal with partial writes should call target_write. */ - - int --target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) -+target_write_memory (CORE_ADDR memaddr, const 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 -@@ -3348,8 +3348,8 @@ debug_to_prepare_to_store (struct regcac - fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); - } - --static int --deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len, -+static LONGEST -+deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, LONGEST len, - int write, struct mem_attrib *attrib, - struct target_ops *target) - { -@@ -3359,8 +3359,8 @@ deprecated_debug_xfer_memory (CORE_ADDR - attrib, target); - - fprintf_unfiltered (gdb_stdlog, -- "target_xfer_memory (%s, xxx, %d, %s, xxx) = %d", -- paddress (target_gdbarch, memaddr), len, -+ "target_xfer_memory (%s, xxx, %ld, %s, xxx) = %d", -+ paddress (target_gdbarch, memaddr), (long) len, - write ? "write" : "read", retval); - - if (retval > 0) -Index: gdb-7.2.50.20101116/gdb/target.h -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/target.h 2010-11-16 07:53:59.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/target.h 2010-11-16 08:00:37.000000000 +0100 -@@ -429,10 +429,10 @@ struct target_ops - NOTE: cagney/2004-10-01: This has been entirely superseeded by - to_xfer_partial and inferior inheritance. */ - -- int (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr, -- int len, int write, -- 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); - - void (*to_files_info) (struct target_ops *); - int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *); -@@ -846,12 +846,12 @@ extern void target_dcache_invalidate (vo - - extern int target_read_string (CORE_ADDR, char **, int, int *); - --extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len); -+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len); - --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); - - extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, -- int len); -+ LONGEST len); - - /* Fetches the target's memory map. If one is found it is sorted - and returned, after some consistency checking. Otherwise, NULL -Index: gdb-7.2.50.20101116/gdb/dcache.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/dcache.c 2010-05-14 19:53:15.000000000 +0200 -+++ gdb-7.2.50.20101116/gdb/dcache.c 2010-11-16 08:00:37.000000000 +0100 -@@ -465,10 +465,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. */ - --int -+LONGEST - dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache, - CORE_ADDR memaddr, gdb_byte *myaddr, -- int len, int should_write) -+ LONGEST len, int should_write) - { - int i; - int res; -Index: gdb-7.2.50.20101116/gdb/dcache.h -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/dcache.h 2010-11-16 08:00:37.000000000 +0100 -@@ -35,8 +35,8 @@ void dcache_free (DCACHE *); - - /* Simple to call from _xfer_memory */ - --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); - - void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, - int len); -Index: gdb-7.2.50.20101116/gdb/exec.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/exec.c 2010-08-31 20:08:43.000000000 +0200 -+++ gdb-7.2.50.20101116/gdb/exec.c 2010-11-16 08:00:37.000000000 +0100 -@@ -571,7 +571,7 @@ map_vmap (bfd *abfd, bfd *arch) - } - - --int -+LONGEST - section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf, - ULONGEST offset, LONGEST len, - struct target_section *sections, -Index: gdb-7.2.50.20101116/gdb/linux-nat.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 08:00:26.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 08:00:37.000000000 +0100 -@@ -5251,7 +5251,7 @@ linux_xfer_partial (struct target_ops *o - #endif - 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, -Index: gdb-7.2.50.20101116/gdb/remote.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/remote.c 2010-11-04 05:48:21.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/remote.c 2010-11-16 08:00:37.000000000 +0100 -@@ -25,6 +25,7 @@ - #include "gdb_string.h" - #include - #include -+#include - #include "inferior.h" - #include "bfd.h" - #include "symfile.h" -@@ -6515,12 +6516,19 @@ handle_notification (char *buf, size_t l - if SHOULD_WRITE is nonzero. Returns length of data written or - read; 0 for error. TARGET is unused. */ - --static int --remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len, -+static LONGEST -+remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, LONGEST mem_len, - 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; - - set_general_thread (inferior_ptid); - -@@ -6529,7 +6537,7 @@ remote_xfer_memory (CORE_ADDR mem_addr, - else - res = remote_read_bytes (mem_addr, buffer, mem_len); - -- return res; -+ return (LONGEST)res; - } - - /* Sends a packet with content determined by the printf format string -Index: gdb-7.2.50.20101116/gdb/remote-sim.c -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/remote-sim.c 2010-08-10 06:39:26.000000000 +0200 -+++ gdb-7.2.50.20101116/gdb/remote-sim.c 2010-11-16 08:01:16.000000000 +0100 -@@ -1055,11 +1055,13 @@ gdbsim_prepare_to_store (struct regcache - - Returns the number of bytes transferred. */ - --static int --gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, -+static LONGEST -+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len, - 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; - struct sim_inferior_data *sim_data - = get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED); - -Index: gdb-7.2.50.20101116/gdb/exec.h -=================================================================== ---- gdb-7.2.50.20101116.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/exec.h 2010-11-16 08:00:37.000000000 +0100 -@@ -60,7 +60,7 @@ extern int resize_section_table (struct - - One, and only one, of readbuf or writebuf must be non-NULL. */ - --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 *, diff --git a/gdb.spec b/gdb.spec index 959ee6a..64e2490 100644 --- a/gdb.spec +++ b/gdb.spec @@ -195,10 +195,6 @@ Patch164: gdb-6.3-readnever-20050907.patch #=ia64 Patch169: gdb-6.3-ia64-sigill-20051115.patch -# Use bigger numbers than int. -#=push -Patch176: gdb-6.3-large-core-20051206.patch - # Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661). #=push+work: There was some mail thread about it, this patch may be a hack. Patch188: gdb-6.5-bz203661-emit-relocs.patch @@ -688,7 +684,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch163 -p1 %patch164 -p1 %patch169 -p1 -%patch176 -p1 %patch188 -p1 %patch190 -p1 %patch194 -p1 @@ -1151,6 +1146,7 @@ fi gdb-6.3-bt-past-zero-20051201.patch as they already had no effect. - Drop gdb-6.8-gcc35998-ada-memory-trash.patch as a different fix is upstream. - Drop gdb-6.3-inheritance-20050324.patch: the call is redundent (Tom Tromey). +- Drop gdb-6.3-large-core-20051206.patch: obsoleted by MAX_COPY_BYTES. * Thu Nov 18 2010 Jan Kratochvil - 7.2.50.20101117-1.fc15 - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release).