- Upgrade to the FSF GDB snapshot: 7.0.50.20100116

- archer-jankratochvil-fedora13 commit:
    81810a20b2d2c3bf18e151de3cddfc96445b3c46
- [expr-cumulative] Archer branch is missing in this release.
- Update rpm.org#76 workaround for rpm-4.8 using librpm.so.1.
- Dissect archer-jankratochvil-misc into Patch403...Patch408.
- Some regressions exist in this release.
This commit is contained in:
Jan Kratochvil 2010-01-16 22:32:10 +00:00
parent 0911f375d9
commit 8c4c91efd9
45 changed files with 4296 additions and 16198 deletions

View File

@ -1,2 +1,2 @@
gdb-7.0.1.tar.bz2 gdb-7.0.50.20100116.tar.bz2
libstdc++-v3-python-r151798.tar.bz2 libstdc++-v3-python-r151798.tar.bz2

View File

@ -25,11 +25,11 @@
Port to GDB-6.7. Port to GDB-6.7.
Index: gdb-6.8.50.20090909/gdb/symfile-mem.c Index: gdb-7.0.50.20100115/gdb/symfile-mem.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile-mem.c 2009-07-02 19:21:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/symfile-mem.c 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/symfile-mem.c 2010-01-15 03:22:23.000000000 +0100
@@ -56,6 +56,14 @@ @@ -57,6 +57,14 @@
#include "elf/common.h" #include "elf/common.h"
@ -44,7 +44,7 @@ Index: gdb-6.8.50.20090909/gdb/symfile-mem.c
/* Read inferior memory at ADDR to find the header of a loaded object file /* 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 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 representing the target's format. NAME is the name to use for this
@@ -76,7 +84,7 @@ symbol_file_add_from_memory (struct bfd @@ -77,7 +85,7 @@ symbol_file_add_from_memory (struct bfd
error (_("add-symbol-file-from-memory not supported for this target")); error (_("add-symbol-file-from-memory not supported for this target"));
nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase, nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
@ -53,10 +53,10 @@ Index: gdb-6.8.50.20090909/gdb/symfile-mem.c
if (nbfd == NULL) if (nbfd == NULL)
error (_("Failed to read a valid object file image from memory.")); error (_("Failed to read a valid object file image from memory."));
Index: gdb-6.8.50.20090909/gdb/target.c Index: gdb-7.0.50.20100115/gdb/target.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/target.c 2009-09-09 19:05:56.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/target.c 2010-01-15 03:22:13.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/target.c 2009-09-09 19:08:11.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/target.c 2010-01-15 03:22:23.000000000 +0100
@@ -59,7 +59,7 @@ static int nosymbol (char *, CORE_ADDR * @@ -59,7 +59,7 @@ static int nosymbol (char *, CORE_ADDR *
static void tcomplain (void) ATTR_NORETURN; static void tcomplain (void) ATTR_NORETURN;
@ -66,7 +66,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
static int return_zero (void); static int return_zero (void);
@@ -492,7 +492,7 @@ target_terminal_inferior (void) @@ -494,7 +494,7 @@ target_terminal_inferior (void)
(*current_target.to_terminal_inferior) (); (*current_target.to_terminal_inferior) ();
} }
@ -75,7 +75,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t) struct target_ops *t)
{ {
@@ -711,7 +711,7 @@ update_current_target (void) @@ -726,7 +726,7 @@ update_current_target (void)
(void (*) (struct regcache *)) (void (*) (struct regcache *))
noprocess); noprocess);
de_fault (deprecated_xfer_memory, de_fault (deprecated_xfer_memory,
@ -84,7 +84,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
nomemory); nomemory);
de_fault (to_files_info, de_fault (to_files_info,
(void (*) (struct target_ops *)) (void (*) (struct target_ops *))
@@ -1443,7 +1443,7 @@ target_xfer_partial (struct target_ops * @@ -1497,7 +1497,7 @@ target_xfer_partial (struct target_ops *
it makes no progress, and then return how much was transferred). */ it makes no progress, and then return how much was transferred). */
int int
@ -93,7 +93,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
{ {
/* Dispatch to the topmost target, not the flattened current_target. /* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the Memory accesses check target->to_has_(all_)memory, and the
@@ -1459,7 +1459,7 @@ target_read_memory (CORE_ADDR memaddr, g @@ -1513,7 +1513,7 @@ target_read_memory (CORE_ADDR memaddr, g
the target's stack. This may trigger different cache behavior. */ the target's stack. This may trigger different cache behavior. */
int int
@ -102,8 +102,8 @@ Index: gdb-6.8.50.20090909/gdb/target.c
{ {
/* Dispatch to the topmost target, not the flattened current_target. /* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the Memory accesses check target->to_has_(all_)memory, and the
@@ -1473,7 +1473,7 @@ target_read_stack (CORE_ADDR memaddr, gd @@ -1532,7 +1532,7 @@ target_read_stack (CORE_ADDR memaddr, gd
} Callers that can deal with partial writes should call target_write. */
int int
-target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len) -target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
@ -111,7 +111,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
{ {
/* Dispatch to the topmost target, not the flattened current_target. /* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the Memory accesses check target->to_has_(all_)memory, and the
@@ -2964,8 +2964,8 @@ debug_to_prepare_to_store (struct regcac @@ -3098,8 +3098,8 @@ debug_to_prepare_to_store (struct regcac
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
} }
@ -122,7 +122,7 @@ Index: gdb-6.8.50.20090909/gdb/target.c
int write, struct mem_attrib *attrib, int write, struct mem_attrib *attrib,
struct target_ops *target) struct target_ops *target)
{ {
@@ -2975,8 +2975,8 @@ deprecated_debug_xfer_memory (CORE_ADDR @@ -3109,8 +3109,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
attrib, target); attrib, target);
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
@ -133,11 +133,11 @@ Index: gdb-6.8.50.20090909/gdb/target.c
write ? "write" : "read", retval); write ? "write" : "read", retval);
if (retval > 0) if (retval > 0)
Index: gdb-6.8.50.20090909/gdb/target.h Index: gdb-7.0.50.20100115/gdb/target.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/target.h 2009-09-09 19:05:56.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/target.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/target.h 2009-09-09 19:07:36.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/target.h 2010-01-15 03:22:23.000000000 +0100
@@ -366,10 +366,10 @@ struct target_ops @@ -406,10 +406,10 @@ struct target_ops
NOTE: cagney/2004-10-01: This has been entirely superseeded by NOTE: cagney/2004-10-01: This has been entirely superseeded by
to_xfer_partial and inferior inheritance. */ to_xfer_partial and inferior inheritance. */
@ -152,7 +152,7 @@ Index: gdb-6.8.50.20090909/gdb/target.h
void (*to_files_info) (struct target_ops *); void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *); int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
@@ -680,12 +680,12 @@ extern void target_dcache_invalidate (vo @@ -786,12 +786,12 @@ extern void target_dcache_invalidate (vo
extern int target_read_string (CORE_ADDR, char **, int, int *); extern int target_read_string (CORE_ADDR, char **, int, int *);
@ -168,13 +168,13 @@ Index: gdb-6.8.50.20090909/gdb/target.h
/* Fetches the target's memory map. If one is found it is sorted /* Fetches the target's memory map. If one is found it is sorted
and returned, after some consistency checking. Otherwise, NULL and returned, after some consistency checking. Otherwise, NULL
Index: gdb-6.8.50.20090909/gdb/dcache.c Index: gdb-7.0.50.20100115/gdb/dcache.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/dcache.c 2009-08-31 22:18:45.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/dcache.c 2010-01-01 08:31:30.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/dcache.c 2009-09-09 19:09:21.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/dcache.c 2010-01-15 03:22:23.000000000 +0100
@@ -390,10 +390,10 @@ dcache_free (DCACHE *dcache) @@ -468,10 +468,10 @@ dcache_free (DCACHE *dcache)
NOTE: This is different than the to_xfer_partial interface, in which
The meaning of the result is the same as for target_write. */ positive values less than LEN mean further transfers may be possible. */
-int -int
+LONGEST +LONGEST
@ -185,10 +185,10 @@ Index: gdb-6.8.50.20090909/gdb/dcache.c
{ {
int i; int i;
int res; int res;
Index: gdb-6.8.50.20090909/gdb/dcache.h Index: gdb-7.0.50.20100115/gdb/dcache.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/dcache.h 2009-08-31 22:18:45.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/dcache.h 2009-09-09 19:08:54.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/dcache.h 2010-01-15 03:22:23.000000000 +0100
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *); @@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
/* Simple to call from <remote>_xfer_memory */ /* Simple to call from <remote>_xfer_memory */
@ -200,11 +200,11 @@ Index: gdb-6.8.50.20090909/gdb/dcache.h
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
int len); int len);
Index: gdb-6.8.50.20090909/gdb/exec.c Index: gdb-7.0.50.20100115/gdb/exec.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/exec.c 2009-07-02 19:21:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/exec.c 2010-01-14 22:01:24.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/exec.c 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/exec.c 2010-01-15 03:22:23.000000000 +0100
@@ -560,7 +560,7 @@ map_vmap (bfd *abfd, bfd *arch) @@ -578,7 +578,7 @@ map_vmap (bfd *abfd, bfd *arch)
} }
@ -213,11 +213,11 @@ Index: gdb-6.8.50.20090909/gdb/exec.c
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf, section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len, ULONGEST offset, LONGEST len,
struct target_section *sections, struct target_section *sections,
Index: gdb-6.8.50.20090909/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/linux-nat.c 2009-09-09 19:06:46.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:14.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/linux-nat.c 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:22:23.000000000 +0100
@@ -4622,7 +4622,7 @@ linux_xfer_partial (struct target_ops *o @@ -5117,7 +5117,7 @@ linux_xfer_partial (struct target_ops *o
#endif #endif
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL) if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
{ /* This region contains ia64 rse registers, we have to re-read. */ { /* This region contains ia64 rse registers, we have to re-read. */
@ -226,10 +226,10 @@ Index: gdb-6.8.50.20090909/gdb/linux-nat.c
/* Re-read register stack area. */ /* Re-read register stack area. */
xxfer = super_xfer_partial (ops, object, annex, xxfer = super_xfer_partial (ops, object, annex,
Index: gdb-6.8.50.20090909/gdb/remote.c Index: gdb-7.0.50.20100115/gdb/remote.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/remote.c 2009-08-18 18:17:16.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/remote.c 2010-01-12 22:40:24.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/remote.c 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/remote.c 2010-01-15 03:22:23.000000000 +0100
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
#include "gdb_string.h" #include "gdb_string.h"
#include <ctype.h> #include <ctype.h>
@ -238,7 +238,7 @@ Index: gdb-6.8.50.20090909/gdb/remote.c
#include "inferior.h" #include "inferior.h"
#include "bfd.h" #include "bfd.h"
#include "symfile.h" #include "symfile.h"
@@ -5764,12 +5765,19 @@ handle_notification (char *buf, size_t l @@ -6175,12 +6176,19 @@ handle_notification (char *buf, size_t l
if SHOULD_WRITE is nonzero. Returns length of data written or if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */ read; 0 for error. TARGET is unused. */
@ -260,7 +260,7 @@ Index: gdb-6.8.50.20090909/gdb/remote.c
set_general_thread (inferior_ptid); set_general_thread (inferior_ptid);
@@ -5778,7 +5786,7 @@ remote_xfer_memory (CORE_ADDR mem_addr, @@ -6189,7 +6197,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
else else
res = remote_read_bytes (mem_addr, buffer, mem_len); res = remote_read_bytes (mem_addr, buffer, mem_len);
@ -269,10 +269,10 @@ Index: gdb-6.8.50.20090909/gdb/remote.c
} }
/* Sends a packet with content determined by the printf format string /* Sends a packet with content determined by the printf format string
Index: gdb-6.8.50.20090909/gdb/remote-sim.c Index: gdb-7.0.50.20100115/gdb/remote-sim.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/remote-sim.c 2009-07-02 19:21:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/remote-sim.c 2010-01-01 08:31:40.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/remote-sim.c 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/remote-sim.c 2010-01-15 03:22:23.000000000 +0100
@@ -752,11 +752,14 @@ gdbsim_prepare_to_store (struct regcache @@ -752,11 +752,14 @@ gdbsim_prepare_to_store (struct regcache
Returns the number of bytes transferred. */ Returns the number of bytes transferred. */
@ -290,11 +290,11 @@ Index: gdb-6.8.50.20090909/gdb/remote-sim.c
/* If no program is running yet, then ignore the simulator for /* If no program is running yet, then ignore the simulator for
memory. Pass the request down to the next target, hopefully memory. Pass the request down to the next target, hopefully
an exec file. */ an exec file. */
Index: gdb-6.8.50.20090909/gdb/exec.h Index: gdb-7.0.50.20100115/gdb/exec.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/exec.h 2009-06-12 20:38:36.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/exec.h 2009-09-09 19:06:57.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/exec.h 2010-01-15 03:22:23.000000000 +0100
@@ -56,7 +56,7 @@ extern int resize_section_table (struct @@ -60,7 +60,7 @@ extern int resize_section_table (struct
One, and only one, of readbuf or writebuf must be non-NULL. */ One, and only one, of readbuf or writebuf must be non-NULL. */

View File

@ -11,11 +11,11 @@
* gdb.texinfo (File Options): Document --readnever. * gdb.texinfo (File Options): Document --readnever.
Index: gdb-6.8.50.20090811/gdb/doc/gdb.texinfo Index: gdb-7.0.50.20100115/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/doc/gdb.texinfo 2009-08-13 10:14:15.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/doc/gdb.texinfo 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/doc/gdb.texinfo 2009-08-13 10:14:18.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/doc/gdb.texinfo 2010-01-15 03:20:04.000000000 +0100
@@ -991,6 +991,12 @@ Read each symbol file's entire symbol ta @@ -995,6 +995,12 @@ Read each symbol file's entire symbol ta
the default, which is to read it incrementally as it is needed. the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster. This makes startup slower, but makes future operations faster.
@ -28,10 +28,10 @@ Index: gdb-6.8.50.20090811/gdb/doc/gdb.texinfo
@end table @end table
@node Mode Options @node Mode Options
Index: gdb-6.8.50.20090811/gdb/main.c Index: gdb-7.0.50.20100115/gdb/main.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/main.c 2009-08-13 10:14:15.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/main.c 2010-01-15 03:18:23.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/main.c 2009-08-13 10:14:18.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/main.c 2010-01-15 03:20:04.000000000 +0100
@@ -382,6 +382,7 @@ captured_main (void *data) @@ -382,6 +382,7 @@ captured_main (void *data)
{"xdb", no_argument, &xdb_commands, 1}, {"xdb", no_argument, &xdb_commands, 1},
{"dbx", no_argument, &dbx_commands, 1}, {"dbx", no_argument, &dbx_commands, 1},
@ -48,10 +48,10 @@ Index: gdb-6.8.50.20090811/gdb/main.c
"), stream); "), stream);
fputs_unfiltered (_("\ fputs_unfiltered (_("\
--se=FILE Use FILE as symbol file and executable file.\n\ --se=FILE Use FILE as symbol file and executable file.\n\
Index: gdb-6.8.50.20090811/gdb/symfile.c Index: gdb-7.0.50.20100115/gdb/symfile.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/symfile.c 2009-08-13 10:14:15.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/symfile.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/symfile.c 2009-08-13 10:14:18.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/symfile.c 2010-01-15 03:20:04.000000000 +0100
@@ -79,6 +79,7 @@ static void clear_symtab_users_cleanup ( @@ -79,6 +79,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file */ /* Global variables owned by this file */
@ -60,19 +60,19 @@ Index: gdb-6.8.50.20090811/gdb/symfile.c
/* External variables and functions referenced. */ /* External variables and functions referenced. */
Index: gdb-6.8.50.20090811/gdb/dwarf2read.c Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/dwarf2read.c 2009-08-13 10:14:15.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/dwarf2read.c 2009-08-13 10:14:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 03:20:18.000000000 +0100
@@ -53,6 +53,7 @@ @@ -50,6 +50,7 @@
#include "jv-lang.h" #include "addrmap.h"
#include "vec.h"
#include "block.h" #include "block.h"
#include "f-lang.h"
+#include "top.h" +#include "top.h"
#include <fcntl.h> #include <fcntl.h>
#include "gdb_string.h" #include "gdb_string.h"
@@ -1245,7 +1246,8 @@ dwarf2_has_info (struct objfile *objfile @@ -1226,7 +1227,8 @@ dwarf2_has_info (struct objfile *objfile
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL); bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
} }
@ -82,11 +82,11 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
&& dwarf2_per_objfile->abbrev.asection != NULL); && dwarf2_per_objfile->abbrev.asection != NULL);
} }
Index: gdb-6.8.50.20090811/gdb/top.h Index: gdb-7.0.50.20100115/gdb/top.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/top.h 2009-01-03 06:57:53.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/top.h 2010-01-01 08:31:42.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/top.h 2009-08-13 10:14:18.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/top.h 2010-01-15 03:20:04.000000000 +0100
@@ -59,6 +59,7 @@ extern void set_prompt (char *); @@ -63,6 +63,7 @@ extern void set_prompt (char *);
/* From random places. */ /* From random places. */
extern int readnow_symbol_files; extern int readnow_symbol_files;

View File

@ -19,19 +19,19 @@ Proposed upstream but never committed upstream.
(source_command): Update documentation. Check permissions if (source_command): Update documentation. Check permissions if
FROM_TTY is -1. FROM_TTY is -1.
Index: gdb-6.8.50.20090226/gdb/cli/cli-cmds.c Index: gdb-7.0.50.20100115/gdb/cli/cli-cmds.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090226.orig/gdb/cli/cli-cmds.c 2009-02-27 00:04:32.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/cli/cli-cmds.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/cli/cli-cmds.c 2009-02-28 07:17:49.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/cli/cli-cmds.c 2010-01-15 03:19:13.000000000 +0100
@@ -36,6 +36,7 @@ @@ -37,6 +37,7 @@
#include "objfiles.h" #include "objfiles.h"
#include "source.h" #include "source.h"
#include "disasm.h" #include "disasm.h"
+#include "gdb_stat.h" +#include "gdb_stat.h"
extern void disconnect_or_stop_tracing (int from_tty);
#include "ui-out.h" #include "ui-out.h"
@@ -475,7 +476,7 @@ source_script (char *file, int from_tty)
@@ -466,7 +467,7 @@ source_script (char *file, int from_tty)
if (fd == -1) if (fd == -1)
{ {
@ -40,7 +40,7 @@ Index: gdb-6.8.50.20090226/gdb/cli/cli-cmds.c
perror_with_name (file); perror_with_name (file);
else else
{ {
@@ -475,6 +476,29 @@ source_script (char *file, int from_tty) @@ -484,6 +485,29 @@ source_script (char *file, int from_tty)
} }
} }
@ -70,7 +70,7 @@ Index: gdb-6.8.50.20090226/gdb/cli/cli-cmds.c
is_python = source_python; is_python = source_python;
if (strlen (file) > 3 && !strcmp (&file[strlen (file) - 3], ".py")) if (strlen (file) > 3 && !strcmp (&file[strlen (file) - 3], ".py"))
is_python = 1; is_python = 1;
@@ -486,6 +510,7 @@ source_script (char *file, int from_tty) @@ -495,6 +519,7 @@ source_script (char *file, int from_tty)
else else
script_from_file (stream, file); script_from_file (stream, file);
@ -78,10 +78,10 @@ Index: gdb-6.8.50.20090226/gdb/cli/cli-cmds.c
do_cleanups (old_cleanups); do_cleanups (old_cleanups);
} }
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gdbinit.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.exp 2009-02-28 07:15:57.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gdbinit.exp 2010-01-15 03:18:23.000000000 +0100
@@ -0,0 +1,98 @@ @@ -0,0 +1,98 @@
+# Copyright 2005 +# Copyright 2005
+# Free Software Foundation, Inc. +# Free Software Foundation, Inc.
@ -181,17 +181,17 @@ Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.exp
+} +}
+ +
+remote_exec build "rm .gdbinit" +remote_exec build "rm .gdbinit"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.sample Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gdbinit.sample
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.sample 2009-02-28 07:15:57.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gdbinit.sample 2010-01-15 03:18:23.000000000 +0100
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+echo "\nin gdbinit" +echo "\nin gdbinit"
Index: gdb-6.8.50.20090226/gdb/main.c Index: gdb-7.0.50.20100115/gdb/main.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090226.orig/gdb/main.c 2009-02-27 00:04:32.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/main.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/main.c 2009-02-28 07:15:57.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/main.c 2010-01-15 03:18:23.000000000 +0100
@@ -855,7 +855,7 @@ Excess command line arguments ignored. ( @@ -815,7 +815,7 @@ Excess command line arguments ignored. (
debugging or what directory you are in. */ debugging or what directory you are in. */
if (home_gdbinit && !inhibit_gdbinit) if (home_gdbinit && !inhibit_gdbinit)
@ -200,7 +200,7 @@ Index: gdb-6.8.50.20090226/gdb/main.c
/* Now perform all the actions indicated by the arguments. */ /* Now perform all the actions indicated by the arguments. */
if (cdarg != NULL) if (cdarg != NULL)
@@ -924,7 +924,7 @@ Can't attach to process and specify a co @@ -884,7 +884,7 @@ Can't attach to process and specify a co
/* Read the .gdbinit file in the current directory, *if* it isn't /* Read the .gdbinit file in the current directory, *if* it isn't
the same as the $HOME/.gdbinit file (it should exist, also). */ the same as the $HOME/.gdbinit file (it should exist, also). */
if (local_gdbinit && !inhibit_gdbinit) if (local_gdbinit && !inhibit_gdbinit)

View File

@ -23,10 +23,10 @@
Port to GDB-6.8pre. Port to GDB-6.8pre.
Index: gdb-6.8.50.20090802/gdb/amd64-linux-nat.c Index: gdb-7.0.50.20100115/gdb/amd64-linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/amd64-linux-nat.c 2009-06-17 20:44:23.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/amd64-linux-nat.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/amd64-linux-nat.c 2009-08-03 15:49:33.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/amd64-linux-nat.c 2010-01-15 03:20:58.000000000 +0100
@@ -51,6 +51,9 @@ @@ -51,6 +51,9 @@
#include "i386-linux-tdep.h" #include "i386-linux-tdep.h"
#include "amd64-nat.h" #include "amd64-nat.h"
@ -170,7 +170,7 @@ Index: gdb-6.8.50.20090802/gdb/amd64-linux-nat.c
/* Transfering the general-purpose registers between GDB, inferiors /* Transfering the general-purpose registers between GDB, inferiors
and core files. */ and core files. */
@@ -682,6 +804,11 @@ _initialize_amd64_linux_nat (void) @@ -727,6 +849,11 @@ _initialize_amd64_linux_nat (void)
t->to_fetch_registers = amd64_linux_fetch_inferior_registers; t->to_fetch_registers = amd64_linux_fetch_inferior_registers;
t->to_store_registers = amd64_linux_store_inferior_registers; t->to_store_registers = amd64_linux_store_inferior_registers;
@ -182,11 +182,11 @@ Index: gdb-6.8.50.20090802/gdb/amd64-linux-nat.c
/* Register the target. */ /* Register the target. */
linux_nat_add_target (t); linux_nat_add_target (t);
linux_nat_set_new_thread (t, amd64_linux_new_thread); linux_nat_set_new_thread (t, amd64_linux_new_thread);
Index: gdb-6.8.50.20090802/gdb/config.in Index: gdb-7.0.50.20100115/gdb/config.in
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/config.in 2009-08-03 09:50:57.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/config.in 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/config.in 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/config.in 2010-01-15 03:20:58.000000000 +0100
@@ -146,6 +146,9 @@ @@ -149,6 +149,9 @@
/* Define to 1 if you have the <elf_hp.h> header file. */ /* Define to 1 if you have the <elf_hp.h> header file. */
#undef HAVE_ELF_HP_H #undef HAVE_ELF_HP_H
@ -196,7 +196,7 @@ Index: gdb-6.8.50.20090802/gdb/config.in
/* Define to 1 if your system has the etext variable. */ /* Define to 1 if your system has the etext variable. */
#undef HAVE_ETEXT #undef HAVE_ETEXT
@@ -487,6 +490,9 @@ @@ -490,6 +493,9 @@
/* Define to 1 if you have the <sys/poll.h> header file. */ /* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H #undef HAVE_SYS_POLL_H
@ -206,7 +206,7 @@ Index: gdb-6.8.50.20090802/gdb/config.in
/* Define to 1 if you have the <sys/procfs.h> header file. */ /* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H #undef HAVE_SYS_PROCFS_H
@@ -514,6 +520,9 @@ @@ -517,6 +523,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #undef HAVE_SYS_TYPES_H
@ -216,11 +216,11 @@ Index: gdb-6.8.50.20090802/gdb/config.in
/* Define to 1 if you have the <sys/user.h> header file. */ /* Define to 1 if you have the <sys/user.h> header file. */
#undef HAVE_SYS_USER_H #undef HAVE_SYS_USER_H
Index: gdb-6.8.50.20090802/gdb/configure Index: gdb-7.0.50.20100115/gdb/configure
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/configure 2009-08-03 09:50:57.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/configure 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/configure 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/configure 2010-01-15 03:20:58.000000000 +0100
@@ -12545,6 +12545,268 @@ _ACEOF @@ -10043,6 +10043,268 @@ $as_echo "#define STDC_HEADERS 1" >>conf
fi fi
@ -489,11 +489,11 @@ Index: gdb-6.8.50.20090802/gdb/configure
# elf_hp.h is for HP/UX 64-bit shared library support. # elf_hp.h is for HP/UX 64-bit shared library support.
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
# unconditionally, so what's the point in checking these? # unconditionally, so what's the point in checking these?
Index: gdb-6.8.50.20090802/gdb/configure.ac Index: gdb-7.0.50.20100115/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/configure.ac 2009-08-03 09:50:57.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/configure.ac 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/configure.ac 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/configure.ac 2010-01-15 03:20:58.000000000 +0100
@@ -744,6 +744,11 @@ AC_SUBST(PYTHON_CFLAGS) @@ -758,6 +758,11 @@ AC_SUBST(PYTHON_CFLAGS)
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STAT AC_HEADER_STAT
AC_HEADER_STDC AC_HEADER_STDC
@ -505,11 +505,11 @@ Index: gdb-6.8.50.20090802/gdb/configure.ac
# elf_hp.h is for HP/UX 64-bit shared library support. # elf_hp.h is for HP/UX 64-bit shared library support.
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
# unconditionally, so what's the point in checking these? # unconditionally, so what's the point in checking these?
Index: gdb-6.8.50.20090802/gdb/gcore.c Index: gdb-7.0.50.20100115/gdb/gcore.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/gcore.c 2009-08-03 12:28:56.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/gcore.c 2010-01-15 03:17:59.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/gcore.c 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/gcore.c 2010-01-15 03:20:58.000000000 +0100
@@ -324,6 +324,11 @@ gcore_create_callback (CORE_ADDR vaddr, @@ -376,6 +376,11 @@ gcore_create_callback (CORE_ADDR vaddr,
asection *osec; asection *osec;
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD; flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
@ -521,10 +521,10 @@ Index: gdb-6.8.50.20090802/gdb/gcore.c
/* If the memory segment has no permissions set, ignore it, otherwise /* If the memory segment has no permissions set, ignore it, otherwise
when we later try to access it for read/write, we'll get an error when we later try to access it for read/write, we'll get an error
or jam the kernel. */ or jam the kernel. */
Index: gdb-6.8.50.20090802/gdb/gdb_procfs32.h Index: gdb-7.0.50.20100115/gdb/gdb_procfs32.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/gdb_procfs32.h 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/gdb_procfs32.h 2010-01-15 03:20:58.000000000 +0100
@@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
+#ifdef HAVE_SYS_PROCFS32_H +#ifdef HAVE_SYS_PROCFS32_H
+#include <sys/procfs32.h> +#include <sys/procfs32.h>
@ -654,10 +654,10 @@ Index: gdb-6.8.50.20090802/gdb/gdb_procfs32.h
+#endif /* _SYS_PROCFS32_H */ +#endif /* _SYS_PROCFS32_H */
+ +
+#endif /* HAVE_SYS_PROCFS32_H */ +#endif /* HAVE_SYS_PROCFS32_H */
Index: gdb-6.8.50.20090802/gdb/gdb_user32.h Index: gdb-7.0.50.20100115/gdb/gdb_user32.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/gdb_user32.h 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/gdb_user32.h 2010-01-15 03:20:58.000000000 +0100
@@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
+#ifdef HAVE_SYS_USER32_H +#ifdef HAVE_SYS_USER32_H
+#include <sys/user32.h> +#include <sys/user32.h>
@ -767,11 +767,11 @@ Index: gdb-6.8.50.20090802/gdb/gdb_user32.h
+#endif /* _SYS_USER32_H */ +#endif /* _SYS_USER32_H */
+ +
+#endif /* HAVE_SYS_USER32_H */ +#endif /* HAVE_SYS_USER32_H */
Index: gdb-6.8.50.20090802/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/linux-nat.c 2009-08-03 12:31:26.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:20:45.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/linux-nat.c 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:20:58.000000000 +0100
@@ -219,6 +219,21 @@ static LONGEST (*super_xfer_partial) (st @@ -225,6 +225,21 @@ static LONGEST (*super_xfer_partial) (st
const gdb_byte *, const gdb_byte *,
ULONGEST, LONGEST); ULONGEST, LONGEST);
@ -793,7 +793,7 @@ Index: gdb-6.8.50.20090802/gdb/linux-nat.c
static int debug_linux_nat; static int debug_linux_nat;
static void static void
show_debug_linux_nat (struct ui_file *file, int from_tty, show_debug_linux_nat (struct ui_file *file, int from_tty,
@@ -3586,7 +3601,7 @@ linux_nat_do_thread_registers (bfd *obfd @@ -4187,7 +4202,7 @@ linux_nat_do_thread_registers (bfd *obfd
else else
fill_gregset (regcache, &gregs, -1); fill_gregset (regcache, &gregs, -1);
@ -802,7 +802,7 @@ Index: gdb-6.8.50.20090802/gdb/linux-nat.c
note_data, note_data,
note_size, note_size,
lwp, lwp,
@@ -3636,10 +3651,10 @@ linux_nat_do_thread_registers (bfd *obfd @@ -4237,10 +4252,10 @@ linux_nat_do_thread_registers (bfd *obfd
else else
fill_fpregset (regcache, &fpregs, -1); fill_fpregset (regcache, &fpregs, -1);
@ -815,7 +815,7 @@ Index: gdb-6.8.50.20090802/gdb/linux-nat.c
} }
return note_data; return note_data;
@@ -3822,9 +3837,9 @@ linux_nat_make_corefile_notes (bfd *obfd @@ -4423,9 +4438,9 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end); psargs_end - string_end);
} }
} }
@ -828,14 +828,14 @@ Index: gdb-6.8.50.20090802/gdb/linux-nat.c
} }
/* Dump information for threads. */ /* Dump information for threads. */
Index: gdb-6.8.50.20090802/gdb/linux-nat.h Index: gdb-7.0.50.20100115/gdb/linux-nat.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090802.orig/gdb/linux-nat.h 2009-08-03 10:52:00.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.h 2010-01-15 03:17:07.000000000 +0100
+++ gdb-6.8.50.20090802/gdb/linux-nat.h 2009-08-03 15:48:31.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.h 2010-01-15 03:21:26.000000000 +0100
@@ -144,3 +144,12 @@ void linux_nat_switch_fork (ptid_t new_p @@ -169,3 +169,12 @@ struct siginfo *linux_nat_get_siginfo (p
/* Return the saved siginfo associated with PTID. */ /* Compute and return the processor core of a given thread. */
struct siginfo *linux_nat_get_siginfo (ptid_t ptid); int linux_nat_core_of_thread_1 (ptid_t ptid);
+ +
+/* These functions make elfcore note sections. +/* These functions make elfcore note sections.
+ They may get overriden by code adjusting data for multi-target builds. */ + They may get overriden by code adjusting data for multi-target builds. */

View File

@ -1,7 +1,7 @@
Index: gdb-6.8.50.20090909/gdb/event-top.c Index: gdb-7.0.50.20100115/gdb/event-top.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/event-top.c 2009-09-09 20:05:48.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/event-top.c 2010-01-01 08:31:31.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/event-top.c 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/event-top.c 2010-01-15 11:45:20.000000000 +0100
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
#include "cli/cli-script.h" /* for reset_command_nest_depth */ #include "cli/cli-script.h" /* for reset_command_nest_depth */
#include "main.h" #include "main.h"
@ -28,27 +28,19 @@ Index: gdb-6.8.50.20090909/gdb/event-top.c
/* Each interpreter has its own rules on displaying the command /* Each interpreter has its own rules on displaying the command
prompt. */ prompt. */
if (!current_interp_display_prompt_p ()) if (!current_interp_display_prompt_p ())
Index: gdb-6.8.50.20090909/gdb/symfile.c Index: gdb-7.0.50.20100115/gdb/elfread.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile.c 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/elfread.c 2010-01-15 11:43:30.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/symfile.c 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/elfread.c 2010-01-15 11:45:34.000000000 +0100
@@ -57,6 +57,7 @@ @@ -40,6 +40,7 @@
#include "solib.h" #include "gdbcore.h"
#include "remote.h" #include "gdbcmd.h"
#include "libbfd.h" #include "observer.h"
+#include "elf/external.h" +#include "elf/external.h"
#include <sys/types.h> extern void _initialize_elfread (void);
#include <fcntl.h>
@@ -65,6 +66,7 @@
#include <ctype.h>
#include <time.h>
#include <sys/time.h>
+#include <sys/param.h>
@@ -1119,8 +1120,353 @@ build_id_to_filename (struct build_id *b
int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
@@ -1673,8 +1675,353 @@ build_id_to_filename (struct build_id *b
return retval; return retval;
} }
@ -403,7 +395,7 @@ Index: gdb-6.8.50.20090909/gdb/symfile.c
avoidance. */ avoidance. */
struct missing_filepair struct missing_filepair
@@ -1728,11 +2074,17 @@ missing_filepair_change (void) @@ -1174,11 +1520,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */ /* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL; missing_filepair_hash = NULL;
} }
@ -421,7 +413,7 @@ Index: gdb-6.8.50.20090909/gdb/symfile.c
missing_filepair_change (); missing_filepair_change ();
} }
@@ -1799,14 +2151,34 @@ debug_print_missing (const char *binary, @@ -1245,14 +1597,34 @@ debug_print_missing (const char *binary,
*slot = missing_filepair; *slot = missing_filepair;
@ -463,11 +455,11 @@ Index: gdb-6.8.50.20090909/gdb/symfile.c
} }
static char * static char *
Index: gdb-6.8.50.20090909/gdb/symfile.h Index: gdb-7.0.50.20100115/gdb/symfile.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile.h 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/symfile.h 2010-01-15 11:12:33.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/symfile.h 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/symfile.h 2010-01-15 11:45:20.000000000 +0100
@@ -387,6 +387,7 @@ extern struct build_id *build_id_addr_ge @@ -398,6 +398,7 @@ extern struct build_id *build_id_addr_ge
extern char *build_id_to_filename (struct build_id *build_id, extern char *build_id_to_filename (struct build_id *build_id,
char **link_return, int add_debug_suffix); char **link_return, int add_debug_suffix);
extern void debug_print_missing (const char *binary, const char *debug); extern void debug_print_missing (const char *binary, const char *debug);
@ -475,10 +467,10 @@ Index: gdb-6.8.50.20090909/gdb/symfile.h
/* From dwarf2read.c */ /* From dwarf2read.c */
Index: gdb-6.8.50.20090909/gdb/testsuite/lib/gdb.exp Index: gdb-7.0.50.20100115/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/lib/gdb.exp 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/lib/gdb.exp 2010-01-15 11:12:33.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/testsuite/lib/gdb.exp 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/lib/gdb.exp 2010-01-15 11:45:20.000000000 +0100
@@ -1248,7 +1248,7 @@ proc default_gdb_start { } { @@ -1248,7 +1248,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -488,10 +480,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n" send_gdb "set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re "$gdb_prompt $" { -re "$gdb_prompt $" {
Index: gdb-6.8.50.20090909/gdb/testsuite/lib/mi-support.exp Index: gdb-7.0.50.20100115/gdb/testsuite/lib/mi-support.exp
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/lib/mi-support.exp 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/lib/mi-support.exp 2010-01-15 11:12:33.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/testsuite/lib/mi-support.exp 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/lib/mi-support.exp 2010-01-15 11:45:20.000000000 +0100
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } { @@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
} }
} }
@ -501,10 +493,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/lib/mi-support.exp
send_gdb "190-gdb-set build-id-verbose 0\n" send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
Index: gdb-6.8.50.20090909/gdb/tui/tui-interp.c Index: gdb-7.0.50.20100115/gdb/tui/tui-interp.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/tui/tui-interp.c 2009-09-09 20:05:48.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/tui/tui-interp.c 2010-01-01 08:32:07.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/tui/tui-interp.c 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/tui/tui-interp.c 2010-01-15 11:45:20.000000000 +0100
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include "tui/tui.h" #include "tui/tui.h"
#include "tui/tui-io.h" #include "tui/tui-io.h"
@ -522,10 +514,10 @@ Index: gdb-6.8.50.20090909/gdb/tui/tui-interp.c
/* Tell readline what the prompt to display is and what function /* Tell readline what the prompt to display is and what function
it will need to call after a whole line is read. This also it will need to call after a whole line is read. This also
displays the first prompt. */ displays the first prompt. */
Index: gdb-6.8.50.20090909/gdb/aclocal.m4 Index: gdb-7.0.50.20100115/gdb/aclocal.m4
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/aclocal.m4 2009-09-09 20:05:48.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/aclocal.m4 2009-11-11 05:42:39.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/aclocal.m4 2009-09-09 20:09:32.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/aclocal.m4 2010-01-15 11:45:20.000000000 +0100
@@ -19,6 +19,162 @@ You have another version of autoconf. I @@ -19,6 +19,162 @@ You have another version of autoconf. I
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])]) To do so, use the procedure documented by the package, typically `autoreconf'.])])
@ -689,10 +681,10 @@ Index: gdb-6.8.50.20090909/gdb/aclocal.m4
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
Index: gdb-6.8.50.20090909/gdb/config.in Index: gdb-7.0.50.20100115/gdb/config.in
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/config.in 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/config.in 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/config.in 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/config.in 2010-01-15 11:45:20.000000000 +0100
@@ -42,6 +42,9 @@ @@ -42,6 +42,9 @@
/* Define to BFD's default target vector. */ /* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC #undef DEFAULT_BFD_VEC
@ -713,10 +705,10 @@ Index: gdb-6.8.50.20090909/gdb/config.in
/* Define if libunwind library is being used. */ /* Define if libunwind library is being used. */
#undef HAVE_LIBUNWIND #undef HAVE_LIBUNWIND
Index: gdb-6.8.50.20090909/gdb/configure Index: gdb-7.0.50.20100115/gdb/configure
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/configure 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/configure 2009-09-09 20:09:35.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/configure 2010-01-15 11:45:20.000000000 +0100
@@ -676,6 +676,9 @@ REPORT_BUGS_TO @@ -676,6 +676,9 @@ REPORT_BUGS_TO
PKGVERSION PKGVERSION
TARGET_OBS TARGET_OBS
@ -727,7 +719,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
pythondir pythondir
GDB_DATADIR_PATH GDB_DATADIR_PATH
GDB_DATADIR GDB_DATADIR
@@ -886,6 +889,7 @@ with_separate_debug_dir @@ -888,6 +891,7 @@ with_separate_debug_dir
with_gdb_datadir with_gdb_datadir
with_relocated_sources with_relocated_sources
with_pythondir with_pythondir
@ -735,7 +727,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
enable_targets enable_targets
enable_64_bit_bfd enable_64_bit_bfd
enable_gdbcli enable_gdbcli
@@ -925,6 +929,9 @@ LDFLAGS @@ -928,6 +932,9 @@ LDFLAGS
LIBS LIBS
CPPFLAGS CPPFLAGS
CPP CPP
@ -745,7 +737,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
YACC YACC
YFLAGS YFLAGS
XMKMF' XMKMF'
@@ -1588,6 +1595,8 @@ Optional Packages: @@ -1593,6 +1600,8 @@ Optional Packages:
[DATADIR/gdb] [DATADIR/gdb]
--with-pythondir install Python data files in this path --with-pythondir install Python data files in this path
[DATADIR/gdb/python] [DATADIR/gdb/python]
@ -754,7 +746,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
--with-libunwind use libunwind frame unwinding support --with-libunwind use libunwind frame unwinding support
--with-curses use the curses library instead of the termcap --with-curses use the curses library instead of the termcap
library library
@@ -1621,6 +1630,9 @@ Some influential environment variables: @@ -1627,6 +1636,9 @@ Some influential environment variables:
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir> you have headers in a nonstandard directory <include dir>
CPP C preprocessor CPP C preprocessor
@ -764,7 +756,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
YACC The `Yet Another C Compiler' implementation to use. Defaults to YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'. the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC. YFLAGS The list of arguments that will be passed by default to $YACC.
@@ -6675,6 +6687,486 @@ _ACEOF @@ -6760,6 +6772,486 @@ else
fi fi
@ -933,7 +925,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */ +/* end confdefs.h. */
+ +
+/* Duplicate here the declarations to verify they match "symfile.c". */ +/* Duplicate here the declarations to verify they match "elfread.c". */
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <rpm/rpmts.h> +#include <rpm/rpmts.h>
+#include <rpm/rpmdb.h> +#include <rpm/rpmdb.h>
@ -1187,7 +1179,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */ +/* end confdefs.h. */
+ +
+/* Duplicate here the declarations to verify they match "symfile.c". */ +/* Duplicate here the declarations to verify they match "elfread.c". */
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <rpm/rpmts.h> +#include <rpm/rpmts.h>
+#include <rpm/rpmdb.h> +#include <rpm/rpmdb.h>
@ -1251,7 +1243,7 @@ Index: gdb-6.8.50.20090909/gdb/configure
@@ -9721,265 +10213,25 @@ $as_echo "#define STDC_HEADERS 1" >>conf @@ -10043,265 +10535,25 @@ $as_echo "#define STDC_HEADERS 1" >>conf
fi fi
@ -1527,11 +1519,11 @@ Index: gdb-6.8.50.20090909/gdb/configure
fi fi
Index: gdb-6.8.50.20090909/gdb/configure.ac Index: gdb-7.0.50.20100115/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure.ac 2009-09-09 20:08:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/configure.ac 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/configure.ac 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/configure.ac 2010-01-15 11:45:20.000000000 +0100
@@ -151,6 +151,199 @@ else @@ -152,6 +152,199 @@ else
fi fi
AC_SUBST(pythondir) AC_SUBST(pythondir)
@ -1664,7 +1656,7 @@ Index: gdb-6.8.50.20090909/gdb/configure.ac
+ save_CFLAGS="$CFLAGS" + save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
+/* Duplicate here the declarations to verify they match "symfile.c". */ +/* Duplicate here the declarations to verify they match "elfread.c". */
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <rpm/rpmts.h> +#include <rpm/rpmts.h>
+#include <rpm/rpmdb.h> +#include <rpm/rpmdb.h>
@ -1731,17 +1723,17 @@ Index: gdb-6.8.50.20090909/gdb/configure.ac
AC_CONFIG_SUBDIRS(doc testsuite) AC_CONFIG_SUBDIRS(doc testsuite)
Index: gdb-6.8.50.20090909/gdb/acinclude.m4 Index: gdb-7.0.50.20100115/gdb/acinclude.m4
=================================================================== ===================================================================
--- gdb-6.8.50.20090909.orig/gdb/acinclude.m4 2009-09-09 20:05:48.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/acinclude.m4 2010-01-08 08:16:43.000000000 +0100
+++ gdb-6.8.50.20090909/gdb/acinclude.m4 2009-09-09 20:08:04.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/acinclude.m4 2010-01-15 11:45:20.000000000 +0100
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
+# serial 1 +# serial 1
+ +
dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support
dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov> dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
@@ -79,8 +81,6 @@ AC_MSG_RESULT(yes) @@ -81,8 +83,6 @@ AC_MSG_RESULT(yes)
# Foundation, Inc., 51 Franklin Street, Fifth Floor, # Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA. # Boston, MA 02110-1301, USA.

View File

@ -1,11 +1,11 @@
Index: gdb-7.0/gdb/corelow.c Index: gdb-7.0.50.20100115/gdb/corelow.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/corelow.c 2009-07-31 17:25:21.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/corelow.c 2010-01-04 15:57:43.000000000 +0100
+++ gdb-7.0/gdb/corelow.c 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/corelow.c 2010-01-15 11:14:05.000000000 +0100
@@ -45,6 +45,10 @@ @@ -46,6 +46,10 @@
#include "exceptions.h"
#include "solib.h" #include "solib.h"
#include "filenames.h" #include "filenames.h"
#include "progspace.h"
+#include "auxv.h" +#include "auxv.h"
+#include "elf/common.h" +#include "elf/common.h"
+#include "objfiles.h" +#include "objfiles.h"
@ -13,7 +13,7 @@ Index: gdb-7.0/gdb/corelow.c
#ifndef O_LARGEFILE #ifndef O_LARGEFILE
@@ -273,6 +277,52 @@ add_to_thread_list (bfd *abfd, asection @@ -290,6 +294,52 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current */ inferior_ptid = ptid; /* Yes, make it current */
} }
@ -66,7 +66,7 @@ Index: gdb-7.0/gdb/corelow.c
/* This routine opens and sets up the core file bfd. */ /* This routine opens and sets up the core file bfd. */
static void static void
@@ -371,6 +421,12 @@ core_open (char *filename, int from_tty) @@ -387,6 +437,12 @@ core_open (char *filename, int from_tty)
push_target (&core_ops); push_target (&core_ops);
discard_cleanups (old_chain); discard_cleanups (old_chain);
@ -76,10 +76,10 @@ Index: gdb-7.0/gdb/corelow.c
+ if (build_id_core_loads != 0) + if (build_id_core_loads != 0)
+ build_id_locate_exec (from_tty); + build_id_locate_exec (from_tty);
+ +
add_inferior_silent (corelow_pid);
/* Do this before acknowledging the inferior, so if /* Do this before acknowledging the inferior, so if
@@ -878,4 +934,11 @@ _initialize_corelow (void) post_create_inferior throws (can happen easilly if you're loading
a core file with the wrong exec), we aren't left with threads
@@ -925,4 +981,11 @@ _initialize_corelow (void)
init_core_ops (); init_core_ops ();
add_target (&core_ops); add_target (&core_ops);
@ -91,11 +91,11 @@ Index: gdb-7.0/gdb/corelow.c
+ NULL, NULL, NULL, + NULL, NULL, NULL,
+ &setlist, &showlist); + &setlist, &showlist);
} }
Index: gdb-7.0/gdb/doc/gdb.texinfo Index: gdb-7.0.50.20100115/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/doc/gdb.texinfo 2009-10-23 00:12:39.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/doc/gdb.texinfo 2010-01-15 03:23:50.000000000 +0100
+++ gdb-7.0/gdb/doc/gdb.texinfo 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/doc/gdb.texinfo 2010-01-15 11:12:33.000000000 +0100
@@ -13896,6 +13896,27 @@ information files. @@ -14258,6 +14258,27 @@ information files.
@end table @end table
@ -123,11 +123,11 @@ Index: gdb-7.0/gdb/doc/gdb.texinfo
@cindex @code{.gnu_debuglink} sections @cindex @code{.gnu_debuglink} sections
@cindex debug link sections @cindex debug link sections
A debug link is a special section of the executable file named A debug link is a special section of the executable file named
Index: gdb-7.0/gdb/solib-svr4.c Index: gdb-7.0.50.20100115/gdb/solib-svr4.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/solib-svr4.c 2009-10-23 00:12:38.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/solib-svr4.c 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/solib-svr4.c 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/solib-svr4.c 2010-01-15 11:12:33.000000000 +0100
@@ -1101,9 +1101,49 @@ svr4_current_sos (void) @@ -1116,9 +1116,49 @@ svr4_current_sos (void)
safe_strerror (errcode)); safe_strerror (errcode));
else else
{ {
@ -180,22 +180,25 @@ Index: gdb-7.0/gdb/solib-svr4.c
} }
xfree (buffer); xfree (buffer);
Index: gdb-7.0/gdb/symfile.c Index: gdb-7.0.50.20100115/gdb/elfread.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/symfile.c 2009-10-23 00:12:38.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/elfread.c 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/symfile.c 2009-10-23 00:43:28.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/elfread.c 2010-01-15 11:43:30.000000000 +0100
@@ -56,6 +56,7 @@ @@ -36,6 +36,10 @@
#include "elf-bfd.h" #include "gdb-stabs.h"
#include "solib.h" #include "complaints.h"
#include "remote.h" #include "demangle.h"
+#include "libbfd.h" +#include "libbfd.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
+#include "observer.h"
#include <sys/types.h> extern void _initialize_elfread (void);
#include <fcntl.h>
@@ -1173,16 +1174,65 @@ symbol_file_clear (int from_tty) @@ -567,6 +571,20 @@ elf_symtab_read (struct objfile *objfile
printf_unfiltered (_("No symbol file now.\n")); }
}
} }
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename. +/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
+ +
@ -210,10 +213,10 @@ Index: gdb-7.0/gdb/symfile.c
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"), + fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value); + value);
+} +}
+
struct build_id struct build_id
{ {
size_t size; @@ -574,10 +592,44 @@ struct build_id
gdb_byte data[1]; gdb_byte data[1];
}; };
@ -260,7 +263,7 @@ Index: gdb-7.0/gdb/symfile.c
{ {
struct build_id *retval; struct build_id *retval;
@@ -1198,6 +1248,348 @@ build_id_bfd_get (bfd *abfd) @@ -593,6 +645,348 @@ build_id_bfd_get (bfd *abfd)
return retval; return retval;
} }
@ -609,7 +612,7 @@ Index: gdb-7.0/gdb/symfile.c
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */ /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int static int
@@ -1215,7 +1607,7 @@ build_id_verify (const char *filename, s @@ -607,7 +1001,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL) if (abfd == NULL)
return 0; return 0;
@ -618,7 +621,7 @@ Index: gdb-7.0/gdb/symfile.c
if (found == NULL) if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename); warning (_("File \"%s\" has no build-id, file skipped"), filename);
@@ -1234,14 +1626,16 @@ build_id_verify (const char *filename, s @@ -626,14 +1020,16 @@ build_id_verify (const char *filename, s
return retval; return retval;
} }
@ -639,7 +642,7 @@ Index: gdb-7.0/gdb/symfile.c
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */ cause "/.build-id/..." lookups. */
@@ -1272,7 +1666,10 @@ build_id_to_debug_filename (struct build @@ -664,7 +1060,10 @@ build_id_to_debug_filename (struct build
*s++ = '/'; *s++ = '/';
while (size-- > 0) while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++); s += sprintf (s, "%02x", (unsigned) *data++);
@ -651,7 +654,7 @@ Index: gdb-7.0/gdb/symfile.c
/* lrealpath() is expensive even for the usually non-existent files. */ /* lrealpath() is expensive even for the usually non-existent files. */
if (access (link, F_OK) == 0) if (access (link, F_OK) == 0)
@@ -1285,15 +1682,185 @@ build_id_to_debug_filename (struct build @@ -677,17 +1076,188 @@ build_id_to_debug_filename (struct build
} }
if (retval != NULL) if (retval != NULL)
@ -696,9 +699,9 @@ Index: gdb-7.0/gdb/symfile.c
+ xfree (link); + xfree (link);
+ xfree (link_all); + xfree (link_all);
+ +
+ return retval; return retval;
+} }
+
+/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages +/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
+ Try to install the hash file ... + Try to install the hash file ...
+ avoidance. */ + avoidance. */
@ -721,9 +724,9 @@ Index: gdb-7.0/gdb/symfile.c
+ +
+ retval = obstack_alloc (&missing_filepair_obstack, size); + retval = obstack_alloc (&missing_filepair_obstack, size);
+ memset (retval, 0, size); + memset (retval, 0, size);
return retval; + return retval;
} +}
+
+static hashval_t +static hashval_t
+missing_filepair_hash_func (const struct missing_filepair *elem) +missing_filepair_hash_func (const struct missing_filepair *elem)
+{ +{
@ -836,70 +839,88 @@ Index: gdb-7.0/gdb/symfile.c
+} +}
+ +
static char * static char *
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) -find_separate_debug_file_by_buildid (struct objfile *objfile)
+find_separate_debug_file_by_buildid (struct objfile *objfile,
+ char **build_id_filename_return)
{ {
@@ -1384,13 +1951,14 @@ find_separate_debug_file (struct objfile asection *sect;
unsigned long crc32; char *basename, *name_copy, *debugdir;
@@ -699,12 +1269,16 @@ find_separate_debug_file_by_buildid (str
int i; int i;
struct build_id *build_id; struct build_id *build_id;
+ char *build_id_filename = NULL;
- build_id = build_id_bfd_get (objfile->obfd); - build_id = build_id_bfd_get (objfile->obfd);
+ if (build_id_filename_return)
+ *build_id_filename_return = NULL;
+
+ build_id = build_id_bfd_shdr_get (objfile->obfd); + build_id = build_id_bfd_shdr_get (objfile->obfd);
if (build_id != NULL) if (build_id != NULL)
{ {
char *build_id_name; char *build_id_name;
- build_id_name = build_id_to_debug_filename (build_id); - build_id_name = build_id_to_debug_filename (build_id);
+ build_id_name = build_id_to_filename (build_id, &build_id_filename, 1); + build_id_name = build_id_to_filename (build_id, build_id_filename_return,
+ 1);
xfree (build_id); xfree (build_id);
/* Prevent looping on a stripped .debug file. */ /* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0) if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
@@ -1400,7 +1968,10 @@ find_separate_debug_file (struct objfile @@ -714,7 +1288,7 @@ find_separate_debug_file_by_buildid (str
xfree (build_id_name); xfree (build_id_name);
} }
else if (build_id_name != NULL) else if (build_id_name != NULL)
- return build_id_name; - return build_id_name;
+ {
+ xfree (build_id_filename);
+ return build_id_name; + return build_id_name;
+ } }
return NULL;
}
@@ -887,9 +1461,10 @@ elf_symfile_read (struct objfile *objfil
`.gnu_debuglink' may no longer be present with `.note.gnu.build-id'. */
else
{
- char *debugfile;
+ char *debugfile, *build_id_filename;
- debugfile = find_separate_debug_file_by_buildid (objfile);
+ debugfile = find_separate_debug_file_by_buildid (objfile,
+ &build_id_filename);
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -900,6 +1475,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, symfile_flags, objfile);
xfree (debugfile);
}
+ /* Check if any separate debug info has been extracted out. */
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
+ != NULL)
+ debug_print_missing (objfile->name, build_id_filename);
+
+ xfree (build_id_filename);
}
} }
basename = get_debug_link_info (objfile, &crc32); @@ -1072,4 +1653,16 @@ void
@@ -1501,8 +2072,10 @@ find_separate_debug_file (struct objfile _initialize_elfread (void)
{
xfree (debugfile); add_symtab_fns (&elf_sym_fns);
debugfile = NULL;
+ debug_print_missing (objfile->name, build_id_filename);
cleanup_return_debugfile:
+ xfree (build_id_filename);
xfree (canon_name);
xfree (basename);
xfree (dir);
@@ -4256,4 +4829,16 @@ each global debug-file-directory compone
NULL,
show_debug_file_directory,
&setlist, &showlist);
+ +
+ add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose, + add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
+ _("\ + _("\
+ Set debugging level of the build-id locator."), _("\ +Set debugging level of the build-id locator."), _("\
+ Show debugging level of the build-id locator."), _("\ +Show debugging level of the build-id locator."), _("\
+ Level 1 (default) enables printing the missing debug filenames,\n\ +Level 1 (default) enables printing the missing debug filenames,\n\
+ level 2 also prints the parsing of binaries to find the identificators."), +level 2 also prints the parsing of binaries to find the identificators."),
+ NULL, + NULL,
+ show_build_id_verbose, + show_build_id_verbose,
+ &setlist, &showlist); + &setlist, &showlist);
+ +
+ observer_attach_executable_changed (debug_print_executable_changed); + observer_attach_executable_changed (debug_print_executable_changed);
} }
Index: gdb-7.0/gdb/symfile.h Index: gdb-7.0.50.20100115/gdb/symfile.h
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/symfile.h 2009-10-23 00:12:38.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/symfile.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/symfile.h 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/symfile.h 2010-01-15 11:12:33.000000000 +0100
@@ -381,6 +381,13 @@ extern int symfile_map_offsets_to_segmen @@ -392,6 +392,13 @@ extern int symfile_map_offsets_to_segmen
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd); struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
void free_symfile_segment_data (struct symfile_segment_data *data); void free_symfile_segment_data (struct symfile_segment_data *data);
@ -913,10 +934,10 @@ Index: gdb-7.0/gdb/symfile.h
/* From dwarf2read.c */ /* From dwarf2read.c */
extern int dwarf2_has_info (struct objfile *); extern int dwarf2_has_info (struct objfile *);
Index: gdb-7.0/gdb/testsuite/lib/gdb.exp Index: gdb-7.0.50.20100115/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/testsuite/lib/gdb.exp 2009-10-23 00:12:38.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/lib/gdb.exp 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/testsuite/lib/gdb.exp 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/lib/gdb.exp 2010-01-15 11:12:33.000000000 +0100
@@ -1248,6 +1248,16 @@ proc default_gdb_start { } { @@ -1248,6 +1248,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -934,10 +955,10 @@ Index: gdb-7.0/gdb/testsuite/lib/gdb.exp
return 0; return 0;
} }
Index: gdb-7.0/gdb/testsuite/lib/mi-support.exp Index: gdb-7.0.50.20100115/gdb/testsuite/lib/mi-support.exp
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/testsuite/lib/mi-support.exp 2009-09-15 20:51:26.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/lib/mi-support.exp 2010-01-12 22:40:25.000000000 +0100
+++ gdb-7.0/gdb/testsuite/lib/mi-support.exp 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/lib/mi-support.exp 2010-01-15 11:12:33.000000000 +0100
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } { @@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
} }
} }
@ -955,11 +976,11 @@ Index: gdb-7.0/gdb/testsuite/lib/mi-support.exp
detect_async detect_async
Index: gdb-7.0/gdb/objfiles.h Index: gdb-7.0.50.20100115/gdb/objfiles.h
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/objfiles.h 2009-10-23 00:12:38.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/objfiles.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/objfiles.h 2009-10-23 00:17:29.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/objfiles.h 2010-01-15 11:14:42.000000000 +0100
@@ -428,6 +428,10 @@ struct objfile @@ -440,6 +440,10 @@ struct objfile
#define OBJF_MAIN (1 << 7) #define OBJF_MAIN (1 << 7)
@ -967,6 +988,6 @@ Index: gdb-7.0/gdb/objfiles.h
+ +
+#define OBJF_BUILD_ID_CORE_LOADED (1 << 12) +#define OBJF_BUILD_ID_CORE_LOADED (1 << 12)
+ +
/* The object file that the main symbol table was loaded from (e.g. the /* The object file that contains the runtime common minimal symbols
argument to the "symbol-file" or "file" command). */ for SunOS4. Note that this objfile has no associated BFD. */

View File

@ -3,23 +3,23 @@
Port to GDB-6.8pre. Port to GDB-6.8pre.
Remove the `[' character from the GDB-6.8 default message. Remove the `[' character from the GDB-6.8 default message.
Index: gdb-6.7.50.20080227/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.7.50.20080227.orig/gdb/linux-nat.c 2008-03-01 10:30:48.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/linux-nat.c 2008-03-01 10:48:25.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:23:28.000000000 +0100
@@ -415,7 +415,7 @@ linux_child_follow_fork (struct target_o @@ -724,7 +724,7 @@ holding the child stopped. Try \"set de
/* Detach new forked process? */ remove_breakpoints_pid (GET_PID (inferior_ptid));
if (detach_fork) }
{
- if (info_verbose || debug_linux_nat) - if (info_verbose || debug_linux_nat)
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat) + if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat)
{ {
target_terminal_ours (); target_terminal_ours ();
fprintf_filtered (gdb_stdlog, fprintf_filtered (gdb_stdlog,
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c 2008-03-01 10:30:49.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c 2010-01-15 03:22:52.000000000 +0100
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -78,10 +78,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c
+ } + }
+ return 0; + return 0;
+} +}
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp 2008-03-01 10:49:36.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp 2010-01-15 03:22:52.000000000 +0100
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+# Copyright 2007 Free Software Foundation, Inc. +# Copyright 2007 Free Software Foundation, Inc.
+ +

View File

@ -21,11 +21,11 @@
Port to GDB-6.8pre. Port to GDB-6.8pre.
Index: gdb-6.8.50.20090803/gdb/inferior.h Index: gdb-7.0.50.20100115/gdb/inferior.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/inferior.h 2009-06-28 02:20:22.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/inferior.h 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/inferior.h 2009-08-03 17:19:56.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/inferior.h 2010-01-15 03:17:07.000000000 +0100
@@ -181,7 +181,15 @@ extern void reopen_exec_file (void); @@ -188,7 +188,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances. /* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */ Normally, use `proceed', which handles a lot of bookkeeping. */
@ -42,11 +42,11 @@ Index: gdb-6.8.50.20090803/gdb/inferior.h
/* From misc files */ /* From misc files */
Index: gdb-6.8.50.20090803/gdb/infrun.c Index: gdb-7.0.50.20100115/gdb/infrun.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/infrun.c 2009-07-31 01:01:27.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/infrun.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/infrun.c 2009-08-03 21:39:28.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/infrun.c 2010-01-15 03:17:32.000000000 +0100
@@ -74,7 +74,7 @@ static int follow_fork (void); @@ -77,7 +77,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty, static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c); struct cmd_list_element *c);
@ -55,7 +55,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
static int currently_stepping_or_nexting_callback (struct thread_info *tp, static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data); void *data);
@@ -1137,7 +1137,7 @@ maybe_software_singlestep (struct gdbarc @@ -1363,7 +1363,7 @@ maybe_software_singlestep (struct gdbarc
STEP nonzero if we should step (zero to continue instead). STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */ SIG is the signal to give the inferior (zero for none). */
void void
@ -64,7 +64,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
{ {
int should_resume = 1; int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1149,10 +1149,12 @@ resume (int step, enum target_signal sig @@ -1376,10 +1376,12 @@ resume (int step, enum target_signal sig
QUIT; QUIT;
if (debug_infrun) if (debug_infrun)
@ -81,7 +81,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping /* Some targets (e.g. Solaris x86) have a kernel bug when stepping
over an instruction that causes a page fault without triggering over an instruction that causes a page fault without triggering
@@ -1271,9 +1273,10 @@ a command like `return' or `jump' to con @@ -1501,9 +1503,10 @@ a command like `return' or `jump' to con
individually. */ individually. */
resume_ptid = inferior_ptid; resume_ptid = inferior_ptid;
} }
@ -94,16 +94,16 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
{ {
/* User-settable 'scheduler' mode requires solo thread resume. */ /* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid; resume_ptid = inferior_ptid;
@@ -1474,7 +1477,7 @@ proceed (CORE_ADDR addr, enum target_sig @@ -1709,7 +1712,7 @@ proceed (CORE_ADDR addr, enum target_sig
struct gdbarch *gdbarch;
struct thread_info *tp; struct thread_info *tp;
CORE_ADDR pc; CORE_ADDR pc;
struct address_space *aspace;
- int oneproc = 0; - int oneproc = 0;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE; + enum resume_step resume_step = RESUME_STEP_CONTINUE;
/* If we're stopped at a fork/vfork, follow the branch set by the /* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed "set follow-fork-mode" command; otherwise, we'll just proceed
@@ -1508,13 +1511,13 @@ proceed (CORE_ADDR addr, enum target_sig @@ -1744,13 +1747,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway. actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */ We'll be (un-)executing the previous instruction. */
@ -119,7 +119,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
} }
else else
{ {
@@ -1545,13 +1548,13 @@ proceed (CORE_ADDR addr, enum target_sig @@ -1781,13 +1784,13 @@ proceed (CORE_ADDR addr, enum target_sig
is required it returns TRUE and sets the current thread to is required it returns TRUE and sets the current thread to
the old thread. */ the old thread. */
if (prepare_to_proceed (step)) if (prepare_to_proceed (step))
@ -135,7 +135,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
{ {
tp->trap_expected = 1; tp->trap_expected = 1;
/* If displaced stepping is enabled, we can step over the /* If displaced stepping is enabled, we can step over the
@@ -1637,8 +1640,13 @@ proceed (CORE_ADDR addr, enum target_sig @@ -1873,8 +1876,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */ /* Reset to normal state. */
init_infwait_state (); init_infwait_state ();
@ -150,7 +150,7 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
/* Wait for it to stop (if not standalone) /* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */ and in any case decode why it stopped, and act accordingly. */
@@ -4171,13 +4179,18 @@ infrun: not switching back to stepped th @@ -4655,13 +4663,18 @@ infrun: not switching back to stepped th
/* Is thread TP in the middle of single-stepping? */ /* Is thread TP in the middle of single-stepping? */
@ -174,11 +174,11 @@ Index: gdb-6.8.50.20090803/gdb/infrun.c
} }
/* Returns true if any thread *but* the one passed in "data" is in the /* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-6.8.50.20090803/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-07-31 17:25:21.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-03 21:39:10.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:17:07.000000000 +0100
@@ -2351,7 +2351,10 @@ count_events_callback (struct lwp_info * @@ -2883,7 +2883,10 @@ count_events_callback (struct lwp_info *
static int static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data) select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{ {
@ -190,10 +190,10 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
return 1; return 1;
else else
return 0; return 0;
Index: gdb-6.8.50.20090803/gdb/linux-nat.h Index: gdb-7.0.50.20100115/gdb/linux-nat.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.h 2009-05-18 19:11:25.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.h 2010-01-12 22:40:24.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/linux-nat.h 2009-08-03 21:39:09.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.h 2010-01-15 03:17:07.000000000 +0100
@@ -55,8 +55,8 @@ struct lwp_info @@ -55,8 +55,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */ /* If non-zero, a pending wait status. */
int status; int status;

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20090803/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-03 17:24:03.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 11:53:34.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-03 17:27:23.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 12:13:53.000000000 +0100
@@ -202,6 +202,9 @@ blocked. */ @@ -208,6 +208,9 @@ blocked. */
static struct target_ops *linux_ops; static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved; static struct target_ops linux_ops_saved;
@ -12,8 +12,8 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
/* The method to call, if any, when a new thread is attached. */ /* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (ptid_t); static void (*linux_nat_new_thread) (ptid_t);
@@ -790,7 +793,14 @@ linux_child_follow_fork (struct target_o @@ -933,7 +936,14 @@ Attaching after process %d fork to child
linux_parent_pid = parent_pid; parent_inf->waiting_for_vfork_done = 0;
} }
else if (detach_fork) else if (detach_fork)
- target_detach (NULL, 0); - target_detach (NULL, 0);
@ -26,9 +26,9 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
+ target_detach (NULL, 0); + target_detach (NULL, 0);
+ } + }
inferior_ptid = ptid_build (child_pid, child_pid, 0); /* Note that the detach above makes PARENT_INF dangling. */
add_thread (inferior_ptid);
@@ -1231,6 +1241,7 @@ linux_nat_post_attach_wait (ptid_t ptid, @@ -1427,6 +1437,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat) if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n"); "LNPAW: Attaching to a stopped process\n");
@ -36,8 +36,8 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
/* The process is definitely stopped. It is in a job control /* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED / stop, unless the kernel predates the TASK_STOPPED /
@@ -1512,6 +1523,9 @@ GPT: lwp %s had signal %s, but it is in @@ -1757,6 +1768,9 @@ GPT: lwp %s had signal %s, but it is in
*status = lp->status; target_signal_to_string (signo));
} }
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped) + if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
@ -46,7 +46,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
return 0; return 0;
} }
@@ -1621,6 +1635,8 @@ linux_nat_detach (struct target_ops *ops @@ -1866,6 +1880,8 @@ linux_nat_detach (struct target_ops *ops
} }
else else
linux_ops->to_detach (ops, args, from_tty); linux_ops->to_detach (ops, args, from_tty);
@ -55,7 +55,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
} }
/* Resume LP. */ /* Resume LP. */
@@ -1774,6 +1790,14 @@ linux_nat_resume (struct target_ops *ops @@ -2031,6 +2047,14 @@ linux_nat_resume (struct target_ops *ops
resume_callback. */ resume_callback. */
lp->stopped = 0; lp->stopped = 0;
@ -70,7 +70,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
if (resume_many) if (resume_many)
iterate_over_lwps (ptid, resume_callback, NULL); iterate_over_lwps (ptid, resume_callback, NULL);
@@ -3322,6 +3346,8 @@ linux_nat_mourn_inferior (struct target_ @@ -3923,6 +3947,8 @@ linux_nat_mourn_inferior (struct target_
there are other viable forks to debug. Delete the exiting there are other viable forks to debug. Delete the exiting
one and context-switch to the first available. */ one and context-switch to the first available. */
linux_fork_mourn_inferior (); linux_fork_mourn_inferior ();
@ -79,10 +79,10 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
} }
/* Convert a native/host siginfo object, into/from the siginfo in the /* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.threads/attach-stopped.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2009-01-03 06:58:07.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-01 08:32:06.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.threads/attach-stopped.exp 2009-08-03 17:26:22.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-15 11:54:57.000000000 +0100
@@ -62,7 +62,65 @@ proc corefunc { threadtype } { @@ -62,7 +62,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} gdb_load ${binfile}
@ -150,10 +150,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.threads/attach-stopped.exp
set test "$threadtype: attach2 to stopped, after setting file" set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" { gdb_test_multiple "attach $testpid" "$test" {
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.threads/attachstop-mt.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2009-01-03 06:58:07.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-01 08:32:06.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.threads/attachstop-mt.exp 2009-08-03 17:26:22.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-15 11:54:57.000000000 +0100
@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" " @@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
# Exit and detach the process. # Exit and detach the process.
gdb_exit gdb_exit

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20090910/bfd/elf-bfd.h Index: gdb-7.0.50.20100115/bfd/elf-bfd.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/bfd/elf-bfd.h 2009-09-09 23:38:57.000000000 +0200 --- gdb-7.0.50.20100115.orig/bfd/elf-bfd.h 2009-11-23 15:41:29.000000000 +0100
+++ gdb-6.8.50.20090910/bfd/elf-bfd.h 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/bfd/elf-bfd.h 2010-01-15 11:53:21.000000000 +0100
@@ -2121,7 +2121,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find @@ -2140,7 +2140,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
extern char *elfcore_write_note extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int); (bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo extern char *elfcore_write_prpsinfo
@ -11,11 +11,11 @@ Index: gdb-6.8.50.20090910/bfd/elf-bfd.h
extern char *elfcore_write_prstatus extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *); (bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus extern char * elfcore_write_pstatus
Index: gdb-6.8.50.20090910/bfd/elf.c Index: gdb-7.0.50.20100115/bfd/elf.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/bfd/elf.c 2009-09-09 23:38:57.000000000 +0200 --- gdb-7.0.50.20100115.orig/bfd/elf.c 2010-01-05 01:40:07.000000000 +0100
+++ gdb-6.8.50.20090910/bfd/elf.c 2009-09-10 23:04:17.000000000 +0200 +++ gdb-7.0.50.20100115/bfd/elf.c 2010-01-15 11:53:21.000000000 +0100
@@ -8398,6 +8398,7 @@ char * @@ -8439,6 +8439,7 @@ char *
elfcore_write_prpsinfo (bfd *abfd, elfcore_write_prpsinfo (bfd *abfd,
char *buf, char *buf,
int *bufsiz, int *bufsiz,
@ -23,7 +23,7 @@ Index: gdb-6.8.50.20090910/bfd/elf.c
const char *fname, const char *fname,
const char *psargs) const char *psargs)
{ {
@@ -8424,9 +8425,15 @@ elfcore_write_prpsinfo (bfd *abfd, @@ -8465,9 +8466,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO; int note_type = NT_PRPSINFO;
#endif #endif
@ -42,7 +42,7 @@ Index: gdb-6.8.50.20090910/bfd/elf.c
return elfcore_write_note (abfd, buf, bufsiz, return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data)); note_name, note_type, &data, sizeof (data));
} }
@@ -8441,9 +8448,15 @@ elfcore_write_prpsinfo (bfd *abfd, @@ -8482,9 +8489,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO; int note_type = NT_PRPSINFO;
#endif #endif
@ -61,10 +61,10 @@ Index: gdb-6.8.50.20090910/bfd/elf.c
return elfcore_write_note (abfd, buf, bufsiz, return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data)); note_name, note_type, &data, sizeof (data));
} }
Index: gdb-6.8.50.20090910/gdb/amd64-linux-nat.c Index: gdb-7.0.50.20100115/gdb/amd64-linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/gdb/amd64-linux-nat.c 2009-09-10 23:01:07.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/amd64-linux-nat.c 2010-01-15 11:46:29.000000000 +0100
+++ gdb-6.8.50.20090910/gdb/amd64-linux-nat.c 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/amd64-linux-nat.c 2010-01-15 11:53:21.000000000 +0100
@@ -140,6 +140,7 @@ static int amd64_linux_gregset32_reg_off @@ -140,6 +140,7 @@ static int amd64_linux_gregset32_reg_off
static char * static char *
@ -98,10 +98,10 @@ Index: gdb-6.8.50.20090910/gdb/amd64-linux-nat.c
} }
static void static void
Index: gdb-6.8.50.20090910/gdb/fbsd-nat.c Index: gdb-7.0.50.20100115/gdb/fbsd-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/gdb/fbsd-nat.c 2009-07-02 19:21:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/fbsd-nat.c 2010-01-01 08:31:31.000000000 +0100
+++ gdb-6.8.50.20090910/gdb/fbsd-nat.c 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/fbsd-nat.c 2010-01-15 11:53:21.000000000 +0100
@@ -211,6 +211,7 @@ fbsd_make_corefile_notes (bfd *obfd, int @@ -211,6 +211,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL); psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
@ -110,19 +110,19 @@ Index: gdb-6.8.50.20090910/gdb/fbsd-nat.c
fname, psargs); fname, psargs);
} }
Index: gdb-6.8.50.20090910/gdb/linux-nat.c Index: gdb-7.0.50.20100115/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/gdb/linux-nat.c 2009-09-10 23:01:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:23:50.000000000 +0100
+++ gdb-6.8.50.20090910/gdb/linux-nat.c 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 11:53:34.000000000 +0100
@@ -55,6 +55,7 @@ @@ -56,6 +56,7 @@
#include "xml-support.h"
#include "terminal.h" #include "terminal.h"
#include <sys/vfs.h> #include <sys/vfs.h>
#include "solib.h"
+#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */ +#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */
#ifndef SPUFS_MAGIC #ifndef SPUFS_MAGIC
#define SPUFS_MAGIC 0x23c9b64e #define SPUFS_MAGIC 0x23c9b64e
@@ -222,7 +223,7 @@ static LONGEST (*super_xfer_partial) (st @@ -228,7 +229,7 @@ static LONGEST (*super_xfer_partial) (st
/* This functions make elfcore note sections. /* This functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */ They may get overriden by code adjusting data for multi-target builds. */
char *(*linux_elfcore_write_prpsinfo) char *(*linux_elfcore_write_prpsinfo)
@ -131,7 +131,7 @@ Index: gdb-6.8.50.20090910/gdb/linux-nat.c
char *(*linux_elfcore_write_prstatus) char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus; (bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
static char * static char *
@@ -3946,6 +3947,159 @@ linux_spu_make_corefile_notes (bfd *obfd @@ -4441,6 +4442,159 @@ linux_spu_make_corefile_notes (bfd *obfd
return args.note_data; return args.note_data;
} }
@ -291,7 +291,7 @@ Index: gdb-6.8.50.20090910/gdb/linux-nat.c
/* Fills the "to_make_corefile_note" target vector. Builds the note /* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */ section for a corefile, and returns it in a malloc buffer. */
@@ -3966,8 +4120,14 @@ linux_nat_make_corefile_notes (bfd *obfd @@ -4461,8 +4615,14 @@ linux_nat_make_corefile_notes (bfd *obfd
if (get_exec_file (0)) if (get_exec_file (0))
{ {
@ -306,7 +306,7 @@ Index: gdb-6.8.50.20090910/gdb/linux-nat.c
if (get_inferior_args ()) if (get_inferior_args ())
{ {
char *string_end; char *string_end;
@@ -3983,9 +4143,15 @@ linux_nat_make_corefile_notes (bfd *obfd @@ -4478,9 +4638,15 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end); psargs_end - string_end);
} }
} }
@ -324,11 +324,11 @@ Index: gdb-6.8.50.20090910/gdb/linux-nat.c
} }
/* Dump information for threads. */ /* Dump information for threads. */
Index: gdb-6.8.50.20090910/gdb/linux-nat.h Index: gdb-7.0.50.20100115/gdb/linux-nat.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/gdb/linux-nat.h 2009-09-10 23:01:06.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/linux-nat.h 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.50.20090910/gdb/linux-nat.h 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/linux-nat.h 2010-01-15 11:53:21.000000000 +0100
@@ -154,7 +154,7 @@ struct siginfo *linux_nat_get_siginfo (p @@ -173,7 +173,7 @@ int linux_nat_core_of_thread_1 (ptid_t p
/* These functions make elfcore note sections. /* These functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */ They may get overriden by code adjusting data for multi-target builds. */
extern char *(*linux_elfcore_write_prpsinfo) extern char *(*linux_elfcore_write_prpsinfo)
@ -337,11 +337,11 @@ Index: gdb-6.8.50.20090910/gdb/linux-nat.h
extern char *(*linux_elfcore_write_prstatus) extern char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *); (bfd *, char *, int *, long, int, const void *);
extern char *(*linux_elfcore_write_prfpreg) extern char *(*linux_elfcore_write_prfpreg)
Index: gdb-6.8.50.20090910/gdb/procfs.c Index: gdb-7.0.50.20100115/gdb/procfs.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090910.orig/gdb/procfs.c 2009-08-01 02:02:04.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/procfs.c 2010-01-14 22:15:00.000000000 +0100
+++ gdb-6.8.50.20090910/gdb/procfs.c 2009-09-10 23:01:15.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/procfs.c 2010-01-15 11:53:21.000000000 +0100
@@ -6147,6 +6147,7 @@ procfs_make_note_section (bfd *obfd, int @@ -6186,6 +6186,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd, note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data, note_data,
note_size, note_size,

View File

@ -1,265 +0,0 @@
gdb/
2009-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac: Call AC_SYS_LARGEFILE.
* config.in: Regenerate.
* configure: Regenerate.
Index: gdb-6.8.50.20090909/gdb/configure.ac
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure.ac 2009-09-09 20:08:04.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/configure.ac 2009-09-09 20:11:04.000000000 +0200
@@ -28,6 +28,7 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
gl_EARLY
+AC_SYS_LARGEFILE
AM_PROG_CC_STDC
AC_CONFIG_AUX_DIR(..)
Index: gdb-6.8.50.20090909/gdb/config.in
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/config.in 2009-09-09 20:08:04.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/config.in 2009-09-09 20:11:33.000000000 +0200
@@ -751,10 +751,16 @@
# endif
#endif
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
/* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works around a
<sys/proc.h> problem on IRIX 5. */
#undef _KMEMUSER
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
/* Define to 1 if on MINIX. */
#undef _MINIX
Index: gdb-6.8.50.20090909/gdb/configure
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure 2009-09-09 20:10:45.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/configure 2009-09-09 20:11:07.000000000 +0200
@@ -884,6 +884,7 @@ ac_subst_files='host_makefile_frag'
ac_user_opts='
enable_option_checking
enable_maintainer_mode
+enable_largefile
enable_dependency_tracking
with_separate_debug_dir
with_gdb_datadir
@@ -1562,6 +1563,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
+ --disable-largefile omit support for large files
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-targets=TARGETS
@@ -4100,6 +4102,204 @@ fi
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+

View File

@ -18,11 +18,11 @@
gdb.base/watchpoint.c (global_ptr_ptr): New variable. gdb.base/watchpoint.c (global_ptr_ptr): New variable.
(func4): New testing code for GLOBAL_PTR_PTR. (func4): New testing code for GLOBAL_PTR_PTR.
Index: gdb-6.8.50.20090803/gdb/breakpoint.c Index: gdb-7.0.50.20100115/gdb/breakpoint.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/breakpoint.c 2009-08-04 06:29:47.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/breakpoint.c 2010-01-15 11:46:29.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/breakpoint.c 2009-08-04 06:32:50.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/breakpoint.c 2010-01-15 11:49:49.000000000 +0100
@@ -823,7 +823,15 @@ is_hardware_watchpoint (struct breakpoin @@ -947,7 +947,15 @@ is_hardware_watchpoint (struct breakpoin
If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
value chain. The caller must free the values individually. If value chain. The caller must free the values individually. If
VAL_CHAIN is NULL, all generated values will be left on the value VAL_CHAIN is NULL, all generated values will be left on the value
@ -39,8 +39,8 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
static void static void
fetch_watchpoint_value (struct expression *exp, struct value **valp, fetch_watchpoint_value (struct expression *exp, struct value **valp,
@@ -6301,7 +6309,7 @@ watch_command_1 (char *arg, int accessfl @@ -7264,7 +7272,7 @@ watch_command_1 (char *arg, int accessfl
struct symtab_and_line sal; struct breakpoint *b, *scope_breakpoint = NULL;
struct expression *exp; struct expression *exp;
struct block *exp_valid_block; struct block *exp_valid_block;
- struct value *val, *mark; - struct value *val, *mark;
@ -48,7 +48,7 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
struct frame_info *frame; struct frame_info *frame;
char *exp_start = NULL; char *exp_start = NULL;
char *exp_end = NULL; char *exp_end = NULL;
@@ -6392,6 +6400,27 @@ watch_command_1 (char *arg, int accessfl @@ -7352,6 +7360,27 @@ watch_command_1 (char *arg, int accessfl
exp_valid_block = innermost_block; exp_valid_block = innermost_block;
mark = value_mark (); mark = value_mark ();
fetch_watchpoint_value (exp, &val, NULL, NULL); fetch_watchpoint_value (exp, &val, NULL, NULL);
@ -76,11 +76,11 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
if (val != NULL) if (val != NULL)
release_value (val); release_value (val);
Index: gdb-6.8.50.20090803/gdb/gdbtypes.h Index: gdb-7.0.50.20100115/gdb/gdbtypes.h
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/gdbtypes.h 2009-08-04 06:31:58.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/gdbtypes.h 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/gdbtypes.h 2009-08-04 06:32:50.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/gdbtypes.h 2010-01-15 11:49:26.000000000 +0100
@@ -71,7 +71,22 @@ enum type_code @@ -72,7 +72,22 @@ enum type_code
TYPE_CODE_UNION, /* C union or Pascal variant part */ TYPE_CODE_UNION, /* C union or Pascal variant part */
TYPE_CODE_ENUM, /* Enumeration type */ TYPE_CODE_ENUM, /* Enumeration type */
TYPE_CODE_FLAGS, /* Bit flags type */ TYPE_CODE_FLAGS, /* Bit flags type */
@ -104,11 +104,11 @@ Index: gdb-6.8.50.20090803/gdb/gdbtypes.h
TYPE_CODE_INT, /* Integer type */ TYPE_CODE_INT, /* Integer type */
/* Floating type. This is *NOT* a complex type. Beware, there are parts /* Floating type. This is *NOT* a complex type. Beware, there are parts
Index: gdb-6.8.50.20090803/gdb/doc/gdb.texinfo Index: gdb-7.0.50.20100115/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/doc/gdb.texinfo 2009-08-04 06:32:39.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/doc/gdb.texinfo 2010-01-15 11:12:33.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/doc/gdb.texinfo 2009-08-04 06:32:50.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/doc/gdb.texinfo 2010-01-15 11:49:26.000000000 +0100
@@ -3517,6 +3517,18 @@ This command prints a list of watchpoint @@ -3723,6 +3723,18 @@ This command prints a list of watchpoint
it is the same as @code{info break} (@pxref{Set Breaks}). it is the same as @code{info break} (@pxref{Set Breaks}).
@end table @end table
@ -127,10 +127,10 @@ Index: gdb-6.8.50.20090803/gdb/doc/gdb.texinfo
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware @value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
watchpoints execute very quickly, and the debugger reports a change in watchpoints execute very quickly, and the debugger reports a change in
value at the exact instruction where the change occurs. If @value{GDBN} value at the exact instruction where the change occurs. If @value{GDBN}
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-03-03 14:24:12.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/watchpoint.c 2009-12-30 18:33:35.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.c 2009-08-04 06:32:50.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.c 2010-01-15 11:49:26.000000000 +0100
@@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr @@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr
int doread = 0; int doread = 0;
@ -139,7 +139,7 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.c
void marker1 () void marker1 ()
{ {
@@ -118,6 +119,10 @@ func4 () @@ -119,6 +120,10 @@ func4 ()
buf[0] = 3; buf[0] = 3;
global_ptr = buf; global_ptr = buf;
buf[0] = 7; buf[0] = 7;
@ -150,10 +150,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.c
} }
int main () int main ()
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.exp
=================================================================== ===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.base/watchpoint.exp 2009-01-03 06:58:03.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/watchpoint.exp 2010-01-01 08:32:01.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.exp 2009-08-04 06:32:50.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.exp 2010-01-15 11:50:21.000000000 +0100
@@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} { @@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} {
} }
} }
@ -216,10 +216,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.base/watchpoint.exp
} }
} }
@@ -842,6 +879,17 @@ if [initialize] then { @@ -851,6 +888,17 @@ if [initialize] then {
}
test_watchpoint_and_breakpoint test_watchpoint_and_breakpoint
test_watchpoint_in_big_blob
+ +
+ # See above. + # See above.
+ if [istarget "mips-idt-*"] then { + if [istarget "mips-idt-*"] then {

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20090811/gdb/dwarf2read.c Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-6.8.50.20090811.orig/gdb/dwarf2read.c 2009-08-13 10:14:45.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 11:52:59.000000000 +0100
+++ gdb-6.8.50.20090811/gdb/dwarf2read.c 2009-08-13 10:22:36.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 11:53:57.000000000 +0100
@@ -2480,6 +2480,7 @@ scan_partial_symbols (struct partial_die @@ -2529,6 +2529,7 @@ scan_partial_symbols (struct partial_die
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu); add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
break; break;
case DW_TAG_variable: case DW_TAG_variable:
@ -10,7 +10,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
case DW_TAG_typedef: case DW_TAG_typedef:
case DW_TAG_union_type: case DW_TAG_union_type:
if (!pdi->is_declaration) if (!pdi->is_declaration)
@@ -2675,6 +2676,7 @@ add_partial_symbol (struct partial_die_i @@ -2719,6 +2720,7 @@ add_partial_symbol (struct partial_die_i
} }
break; break;
case DW_TAG_variable: case DW_TAG_variable:
@ -18,15 +18,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
if (pdi->is_external) if (pdi->is_external)
{ {
/* Global Variable. /* Global Variable.
@@ -2805,6 +2807,7 @@ die_needs_namespace (struct die_info *di @@ -4770,7 +4772,8 @@ dwarf2_add_field (struct field_info *fip
return 1;
case DW_TAG_variable:
+ case DW_TAG_constant:
{
struct attribute *attr;
attr = dwarf2_attr (die, DW_AT_specification, cu);
@@ -4741,7 +4744,8 @@ dwarf2_add_field (struct field_info *fip
fip->non_public_fields = 1; fip->non_public_fields = 1;
} }
} }
@ -36,7 +28,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
{ {
/* C++ static member. */ /* C++ static member. */
@@ -5233,7 +5237,8 @@ read_structure_type (struct die_info *di @@ -5339,7 +5342,8 @@ read_structure_type (struct die_info *di
while (child_die && child_die->tag) while (child_die && child_die->tag)
{ {
if (child_die->tag == DW_TAG_member if (child_die->tag == DW_TAG_member
@ -46,7 +38,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
{ {
/* NOTE: carlton/2002-11-05: A C++ static data member /* NOTE: carlton/2002-11-05: A C++ static data member
should be a DW_TAG_member that is a declaration, but should be a DW_TAG_member that is a declaration, but
@@ -5352,6 +5357,7 @@ process_structure_scope (struct die_info @@ -5459,6 +5463,7 @@ process_structure_scope (struct die_info
{ {
if (child_die->tag == DW_TAG_member if (child_die->tag == DW_TAG_member
|| child_die->tag == DW_TAG_variable || child_die->tag == DW_TAG_variable
@ -54,7 +46,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
|| child_die->tag == DW_TAG_inheritance) || child_die->tag == DW_TAG_inheritance)
{ {
/* Do nothing. */ /* Do nothing. */
@@ -6980,6 +6986,7 @@ load_partial_dies (bfd *abfd, gdb_byte * @@ -7134,6 +7139,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_subprogram && abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_lexical_block && abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable && abbrev->tag != DW_TAG_variable
@ -62,7 +54,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
&& abbrev->tag != DW_TAG_namespace && abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_module && abbrev->tag != DW_TAG_module
&& abbrev->tag != DW_TAG_member) && abbrev->tag != DW_TAG_member)
@@ -7088,6 +7095,7 @@ load_partial_dies (bfd *abfd, gdb_byte * @@ -7242,6 +7248,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
if (load_all if (load_all
|| abbrev->tag == DW_TAG_subprogram || abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_variable || abbrev->tag == DW_TAG_variable
@ -70,7 +62,7 @@ Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
|| abbrev->tag == DW_TAG_namespace || abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration) || part_die->is_declaration)
{ {
@@ -8901,6 +8909,11 @@ new_symbol (struct die_info *die, struct @@ -9016,6 +9023,11 @@ new_symbol (struct die_info *die, struct
/* Do not add the symbol to any lists. It will be found via /* Do not add the symbol to any lists. It will be found via
BLOCK_FUNCTION from the blockvector. */ BLOCK_FUNCTION from the blockvector. */
break; break;

View File

@ -5,10 +5,10 @@ causing: FAIL: gdb.base/unwindonsignal.exp: unwindonsignal, stack unwound
resume() -> target_resume() move of clear_inline_frame_state() is for: resume() -> target_resume() move of clear_inline_frame_state() is for:
gdb.mi/mi-nsmoribund.exp gdb.mi/mi-nsmoribund.exp
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-bt.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-06-28 02:20:24.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-bt.c 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-bt.c 2010-01-15 11:50:59.000000000 +0100
@@ -13,10 +13,16 @@ @@ -13,10 +13,16 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -28,10 +28,10 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c
inline int func1(void) inline int func1(void)
{ {
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-cmds.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-06-28 02:20:24.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-cmds.c 2010-01-15 11:50:59.000000000 +0100
@@ -13,13 +13,19 @@ @@ -13,13 +13,19 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -54,10 +54,10 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c
inline int func1(void) inline int func1(void)
{ {
bar (); bar ();
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-cmds.exp
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-06-28 02:20:24.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-cmds.exp 2010-01-15 11:50:59.000000000 +0100
@@ -230,7 +230,7 @@ set line3 [gdb_get_line_number "set brea @@ -230,7 +230,7 @@ set line3 [gdb_get_line_number "set brea
gdb_breakpoint $line3 gdb_breakpoint $line3
gdb_continue_to_breakpoint "consecutive func1" gdb_continue_to_breakpoint "consecutive func1"
@ -110,10 +110,10 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp
+gdb_test "info frame" "inlined into frame.*" "outer_inline2 inlined" +gdb_test "info frame" "inlined into frame.*" "outer_inline2 inlined"
+gdb_test "fini" "" "up from outer_inline2" +gdb_test "fini" "" "up from outer_inline2"
+gdb_test "info frame" " in main \[^\n\]*\n source language.*" "main not inlined" +gdb_test "info frame" " in main \[^\n\]*\n source language.*" "main not inlined"
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-locals.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-06-28 02:20:24.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-locals.c 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-locals.c 2010-01-15 11:50:59.000000000 +0100
@@ -13,11 +13,16 @@ @@ -13,11 +13,16 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -133,10 +133,10 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c
inline int func1(int arg1) inline int func1(int arg1)
{ {
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-locals.exp
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-06-30 17:50:27.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-locals.exp 2010-01-15 11:50:59.000000000 +0100
@@ -77,6 +77,9 @@ if { ! $no_frames } { @@ -77,6 +77,9 @@ if { ! $no_frames } {
# Make sure that locals on the stack are found. This is an array to # Make sure that locals on the stack are found. This is an array to
@ -155,11 +155,11 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp
+ setup_kfail *-*-* "gcc/debug.optimization" + setup_kfail *-*-* "gcc/debug.optimization"
+} +}
gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)" gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
Index: gdb-6.8.91.20090917/gdb/frame.c Index: gdb-7.0.50.20100115/gdb/frame.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/frame.c 2009-09-17 12:48:49.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/frame.c 2010-01-15 03:22:14.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/frame.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/frame.c 2010-01-15 11:50:59.000000000 +0100
@@ -310,7 +310,7 @@ fprint_frame (struct ui_file *file, stru @@ -316,7 +316,7 @@ fprint_frame (struct ui_file *file, stru
static struct frame_info * static struct frame_info *
skip_inlined_frames (struct frame_info *frame) skip_inlined_frames (struct frame_info *frame)
{ {
@ -168,7 +168,7 @@ Index: gdb-6.8.91.20090917/gdb/frame.c
frame = get_prev_frame (frame); frame = get_prev_frame (frame);
return frame; return frame;
@@ -1778,6 +1778,7 @@ get_frame_address_in_block (struct frame @@ -1792,6 +1792,7 @@ get_frame_address_in_block (struct frame
{ {
/* A draft address. */ /* A draft address. */
CORE_ADDR pc = get_frame_pc (this_frame); CORE_ADDR pc = get_frame_pc (this_frame);
@ -176,7 +176,7 @@ Index: gdb-6.8.91.20090917/gdb/frame.c
struct frame_info *next_frame = this_frame->next; struct frame_info *next_frame = this_frame->next;
@@ -1820,6 +1821,9 @@ get_frame_address_in_block (struct frame @@ -1834,6 +1835,9 @@ get_frame_address_in_block (struct frame
while in an inlined function, then the code address of the while in an inlined function, then the code address of the
"calling" normal function should not be adjusted either. */ "calling" normal function should not be adjusted either. */
@ -186,7 +186,7 @@ Index: gdb-6.8.91.20090917/gdb/frame.c
while (get_frame_type (next_frame) == INLINE_FRAME) while (get_frame_type (next_frame) == INLINE_FRAME)
next_frame = next_frame->next; next_frame = next_frame->next;
@@ -1851,7 +1855,7 @@ find_frame_sal (struct frame_info *frame @@ -1865,7 +1869,7 @@ find_frame_sal (struct frame_info *frame
sym = inline_skipped_symbol (inferior_ptid); sym = inline_skipped_symbol (inferior_ptid);
init_sal (sal); init_sal (sal);
@ -195,10 +195,10 @@ Index: gdb-6.8.91.20090917/gdb/frame.c
{ {
sal->symtab = SYMBOL_SYMTAB (sym); sal->symtab = SYMBOL_SYMTAB (sym);
sal->line = SYMBOL_LINE (sym); sal->line = SYMBOL_LINE (sym);
Index: gdb-6.8.91.20090917/gdb/breakpoint.c Index: gdb-7.0.50.20100115/gdb/breakpoint.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/breakpoint.c 2009-09-17 12:48:51.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/breakpoint.c 2010-01-15 11:49:49.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/breakpoint.c 2009-09-17 12:49:12.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/breakpoint.c 2010-01-15 11:52:20.000000000 +0100
@@ -62,6 +62,7 @@ @@ -62,6 +62,7 @@
#include "jit.h" #include "jit.h"
#include "xml-syscall.h" #include "xml-syscall.h"
@ -207,7 +207,7 @@ Index: gdb-6.8.91.20090917/gdb/breakpoint.c
/* readline include files */ /* readline include files */
#include "readline/readline.h" #include "readline/readline.h"
@@ -3220,10 +3221,24 @@ bpstat_check_breakpoint_conditions (bpst @@ -3560,10 +3561,24 @@ bpstat_check_breakpoint_conditions (bpst
const struct bp_location *bl = bs->breakpoint_at; const struct bp_location *bl = bs->breakpoint_at;
struct breakpoint *b = bl->owner; struct breakpoint *b = bl->owner;
@ -236,7 +236,7 @@ Index: gdb-6.8.91.20090917/gdb/breakpoint.c
{ {
int value_is_zero = 0; int value_is_zero = 0;
@@ -3399,6 +3399,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p @@ -3731,6 +3746,12 @@ bpstat_stop_status (struct address_space
bs->print = 0; bs->print = 0;
} }
bs->commands = copy_command_lines (bs->commands); bs->commands = copy_command_lines (bs->commands);
@ -248,8 +248,8 @@ Index: gdb-6.8.91.20090917/gdb/breakpoint.c
+ step_into_inline_frame (ptid); + step_into_inline_frame (ptid);
} }
/* Print nothing for this entry if we dont stop or if we dont print. */ /* Print nothing for this entry if we dont stop or dont print. */
@@ -5572,9 +5593,9 @@ set_momentary_breakpoint (struct gdbarch @@ -6039,9 +6060,9 @@ set_momentary_breakpoint (struct gdbarch
{ {
struct breakpoint *b; struct breakpoint *b;
@ -262,11 +262,11 @@ Index: gdb-6.8.91.20090917/gdb/breakpoint.c
b = set_raw_breakpoint (gdbarch, sal, type); b = set_raw_breakpoint (gdbarch, sal, type);
b->enable_state = bp_enabled; b->enable_state = bp_enabled;
Index: gdb-6.8.91.20090917/gdb/inline-frame.c Index: gdb-7.0.50.20100115/gdb/inline-frame.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.c 2009-09-13 18:28:28.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/inline-frame.c 2010-01-01 08:31:36.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/inline-frame.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/inline-frame.c 2010-01-15 11:50:59.000000000 +0100
@@ -199,6 +199,12 @@ inline_frame_sniffer (const struct frame @@ -213,6 +213,12 @@ inline_frame_sniffer (const struct frame
if (frame_block == NULL) if (frame_block == NULL)
return 0; return 0;
@ -279,7 +279,7 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
/* Calculate DEPTH, the number of inlined functions at this /* Calculate DEPTH, the number of inlined functions at this
location. */ location. */
depth = 0; depth = 0;
@@ -208,6 +214,10 @@ inline_frame_sniffer (const struct frame @@ -222,6 +228,10 @@ inline_frame_sniffer (const struct frame
if (block_inlined_p (cur_block)) if (block_inlined_p (cur_block))
depth++; depth++;
@ -290,7 +290,7 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
cur_block = BLOCK_SUPERBLOCK (cur_block); cur_block = BLOCK_SUPERBLOCK (cur_block);
} }
@@ -291,7 +301,6 @@ skip_inline_frames (ptid_t ptid) @@ -300,7 +310,6 @@ skip_inline_frames (ptid_t ptid)
{ {
CORE_ADDR this_pc; CORE_ADDR this_pc;
struct block *frame_block, *cur_block; struct block *frame_block, *cur_block;
@ -298,7 +298,7 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
int skip_count = 0; int skip_count = 0;
struct inline_state *state; struct inline_state *state;
@@ -312,10 +321,7 @@ skip_inline_frames (ptid_t ptid) @@ -321,10 +330,7 @@ skip_inline_frames (ptid_t ptid)
of BLOCK_START. */ of BLOCK_START. */
if (BLOCK_START (cur_block) == this_pc if (BLOCK_START (cur_block) == this_pc
|| block_starting_point_at (this_pc, cur_block)) || block_starting_point_at (this_pc, cur_block))
@ -310,7 +310,7 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
else else
break; break;
} }
@@ -327,7 +333,6 @@ skip_inline_frames (ptid_t ptid) @@ -336,7 +342,6 @@ skip_inline_frames (ptid_t ptid)
state = allocate_inline_frame_state (ptid); state = allocate_inline_frame_state (ptid);
state->skipped_frames = skip_count; state->skipped_frames = skip_count;
state->saved_pc = this_pc; state->saved_pc = this_pc;
@ -318,7 +318,7 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
if (skip_count != 0) if (skip_count != 0)
reinit_frame_cache (); reinit_frame_cache ();
@@ -345,6 +350,23 @@ step_into_inline_frame (ptid_t ptid) @@ -354,6 +359,23 @@ step_into_inline_frame (ptid_t ptid)
reinit_frame_cache (); reinit_frame_cache ();
} }
@ -342,10 +342,10 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.c
/* Return the number of hidden functions inlined into the current /* Return the number of hidden functions inlined into the current
frame. */ frame. */
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-markers.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-06-28 02:20:24.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.opt/inline-markers.c 2010-01-01 08:32:04.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.opt/inline-markers.c 2010-01-15 11:50:59.000000000 +0100
@@ -15,11 +15,6 @@ @@ -15,11 +15,6 @@
extern int x, y; extern int x, y;
@ -358,14 +358,14 @@ Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c
void marker(void) void marker(void)
{ {
x += y; /* set breakpoint 2 here */ x += y; /* set breakpoint 2 here */
Index: gdb-6.8.91.20090917/gdb/gdbthread.h Index: gdb-7.0.50.20100115/gdb/gdbthread.h
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/gdbthread.h 2009-09-17 12:47:07.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/gdbthread.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/gdbthread.h 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/gdbthread.h 2010-01-15 11:51:19.000000000 +0100
@@ -191,6 +191,12 @@ struct thread_info @@ -195,6 +195,12 @@ struct thread_info
/* Function that is called to free PRIVATE. If this is NULL, then
/* Private data used by the target vector implementation. */ xfree will be called on PRIVATE. */
struct private_thread_info *private; void (*private_dtor) (struct private_thread_info *);
+ +
+ /* Nonzero if the current frame PC should be unwound as the caller. It is + /* Nonzero if the current frame PC should be unwound as the caller. It is
+ used to keep the backtrace upper levels existing after finish_command into + used to keep the backtrace upper levels existing after finish_command into
@ -375,11 +375,11 @@ Index: gdb-6.8.91.20090917/gdb/gdbthread.h
}; };
/* Create an empty thread list, or empty the existing one. */ /* Create an empty thread list, or empty the existing one. */
Index: gdb-6.8.91.20090917/gdb/infcmd.c Index: gdb-7.0.50.20100115/gdb/infcmd.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/infcmd.c 2009-09-17 12:47:07.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/infcmd.c 2010-01-15 03:22:13.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/infcmd.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/infcmd.c 2010-01-15 11:51:53.000000000 +0100
@@ -1434,11 +1434,11 @@ finish_command_continuation (void *arg) @@ -1438,11 +1438,11 @@ finish_command_continuation (void *arg)
struct type *value_type; struct type *value_type;
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (a->function)); value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (a->function));
@ -393,7 +393,7 @@ Index: gdb-6.8.91.20090917/gdb/infcmd.c
print_return_value (SYMBOL_TYPE (a->function), value_type); print_return_value (SYMBOL_TYPE (a->function), value_type);
} }
@@ -1546,6 +1546,16 @@ finish_forward (struct symbol *function, @@ -1550,6 +1550,16 @@ finish_forward (struct symbol *function,
tp->initiating_frame = get_frame_id (frame); tp->initiating_frame = get_frame_id (frame);
make_cleanup (delete_longjmp_breakpoint_cleanup, &thread); make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
@ -408,9 +408,9 @@ Index: gdb-6.8.91.20090917/gdb/infcmd.c
+ tp->current_pc_is_notcurrent = 1; + tp->current_pc_is_notcurrent = 1;
+ +
tp->proceed_to_finish = 1; /* We want stop_registers, please... */ tp->proceed_to_finish = 1; /* We want stop_registers, please... */
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0); cargs = xmalloc (sizeof (*cargs));
@@ -1567,7 +1577,9 @@ finish_forward (struct symbol *function, @@ -1570,7 +1580,9 @@ finish_forward (struct symbol *function,
static void static void
finish_command (char *arg, int from_tty) finish_command (char *arg, int from_tty)
{ {
@ -421,7 +421,7 @@ Index: gdb-6.8.91.20090917/gdb/infcmd.c
struct symbol *function; struct symbol *function;
int async_exec = 0; int async_exec = 0;
@@ -1598,45 +1610,63 @@ finish_command (char *arg, int from_tty) @@ -1601,45 +1613,63 @@ finish_command (char *arg, int from_tty)
if (!target_has_execution) if (!target_has_execution)
error (_("The program is not running.")); error (_("The program is not running."));
@ -502,7 +502,7 @@ Index: gdb-6.8.91.20090917/gdb/infcmd.c
/* Print info on the selected frame, including level number but not /* Print info on the selected frame, including level number but not
source. */ source. */
@@ -1650,10 +1680,14 @@ finish_command (char *arg, int from_tty) @@ -1653,10 +1683,14 @@ finish_command (char *arg, int from_tty)
print_stack_frame (get_selected_frame (NULL), 1, LOCATION); print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
} }
@ -518,11 +518,11 @@ Index: gdb-6.8.91.20090917/gdb/infcmd.c
} }
Index: gdb-6.8.91.20090917/gdb/target.c Index: gdb-7.0.50.20100115/gdb/target.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/target.c 2009-09-17 12:48:49.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/target.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/target.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/target.c 2010-01-15 11:50:59.000000000 +0100
@@ -2187,6 +2187,7 @@ target_resume (ptid_t ptid, int step, en @@ -2241,6 +2241,7 @@ target_resume (ptid_t ptid, int step, en
{ {
struct target_ops *t; struct target_ops *t;
@ -530,10 +530,10 @@ Index: gdb-6.8.91.20090917/gdb/target.c
target_dcache_invalidate (); target_dcache_invalidate ();
for (t = current_target.beneath; t != NULL; t = t->beneath) for (t = current_target.beneath; t != NULL; t = t->beneath)
Index: gdb-6.8.91.20090917/gdb/inline-frame.h Index: gdb-7.0.50.20100115/gdb/inline-frame.h
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.h 2009-06-28 02:20:22.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/inline-frame.h 2010-01-01 08:31:36.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/inline-frame.h 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/inline-frame.h 2010-01-15 11:50:59.000000000 +0100
@@ -43,6 +43,10 @@ void clear_inline_frame_state (ptid_t pt @@ -43,6 +43,10 @@ void clear_inline_frame_state (ptid_t pt
void step_into_inline_frame (ptid_t ptid); void step_into_inline_frame (ptid_t ptid);
@ -545,19 +545,19 @@ Index: gdb-6.8.91.20090917/gdb/inline-frame.h
/* Return the number of hidden functions inlined into the current /* Return the number of hidden functions inlined into the current
frame. */ frame. */
Index: gdb-6.8.91.20090917/gdb/dwarf2read.c Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-6.8.91.20090917.orig/gdb/dwarf2read.c 2009-09-17 12:48:51.000000000 +0200 --- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 11:46:29.000000000 +0100
+++ gdb-6.8.91.20090917/gdb/dwarf2read.c 2009-09-17 12:49:01.000000000 +0200 +++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 11:52:59.000000000 +0100
@@ -4128,6 +4128,7 @@ read_func_scope (struct die_info *die, s @@ -4078,6 +4078,7 @@ read_func_scope (struct die_info *die, s
CORE_ADDR baseaddr;
struct block *block; struct block *block;
unsigned die_children = 0;
int inlined_func = (die->tag == DW_TAG_inlined_subroutine); int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
+ struct type *type; + struct type *type;
if (inlined_func) if (inlined_func)
{ {
@@ -4169,7 +4170,10 @@ read_func_scope (struct die_info *die, s @@ -4109,7 +4110,10 @@ read_func_scope (struct die_info *die, s
add_to_cu_func_list (name, lowpc, highpc, cu); add_to_cu_func_list (name, lowpc, highpc, cu);
new = push_context (0, lowpc); new = push_context (0, lowpc);

View File

@ -1,229 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-11/msg00388.html
http://sourceware.org/ml/gdb-cvs/2009-11/msg00156.html
Subject: [patch] Fix crash on reading stabs
Hi,
there is a crash on reading stabs fpc binary:
https://bugzilla.redhat.com/show_bug.cgi?id=537837
Program received signal SIGSEGV, Segmentation fault.
0x000000000069db3d in read_dbx_symtab (objfile=0x1daf5f0) at dbxread.c:1369
1369 if ((namestring[0] == '-' && namestring[1] == 'l')
(gdb) p/x nlist.n_strx
$7 = 0xfffffff8
(gdb) p sizeof(nlist.n_strx)
$10 = 8
Below the patch context is:
namestring = (nlist->n_strx + file_string_table_offset
+ DBX_STRINGTAB (objfile));
so IMO the `(unsigned)' cast is excessive as it does not match the expression
below. Such cast is there since the GDB "Initial revision" (1999).
`n_strx' type:
struct internal_nlist
{
unsigned long n_strx; /* Index into string table of name. */
...
};
Regression tested on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu which does not
mean anything with the default DWARF debug info. It was hanging for stabs so
tried just a large part of gdb.base/*.exp on x86_64-m32 - `unix/-gstabs+/-m32'.
If it isn't obviously approved please feel free to drop it as one should not
use STABS in the first place.
Regards,
Jan
gdb/
2009-11-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* dbxread.c (set_namestring): Remove cast to unsigned. Check N_STRX
overflow.
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -965,8 +965,9 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
{
char *namestring;
- if (((unsigned) nlist->n_strx + file_string_table_offset)
- >= DBX_STRINGTAB_SIZE (objfile))
+ if (nlist->n_strx + file_string_table_offset
+ >= DBX_STRINGTAB_SIZE (objfile)
+ || nlist->n_strx + file_string_table_offset < nlist->n_strx)
{
complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
symnum);
Re: [RFA] Fix "show convenience" test
http://sourceware.org/ml/gdb-patches/2009-09/msg00565.html
http://sourceware.org/ml/gdb-cvs/2009-09/msg00099.html
### src/gdb/testsuite/ChangeLog 2009/09/15 18:51:25 1.1960
### src/gdb/testsuite/ChangeLog 2009/09/17 17:49:46 1.1961
## -1,3 +1,7 @@
+2009-09-17 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * gdb.base/default.exp: Fix "show convenience".
+
2009-09-15 Tom Tromey <tromey@redhat.com>
* lib/mi-support.exp (mi_create_varobj): Update.
--- src/gdb/testsuite/gdb.base/default.exp 2009/08/13 14:58:27 1.31
+++ src/gdb/testsuite/gdb.base/default.exp 2009/09/17 17:49:46 1.32
@@ -598,7 +598,7 @@
#test show confirm
gdb_test "show confirm" "Whether to confirm potentially dangerous operations is o\[a-z\]*." "show confirm"
#test show convenience
-gdb_test "show convenience" "No debugger convenience variables now defined.(\[^\r\n\]*\[\r\n\])+Convenience variables have names starting with \".\";(\[^\r\n\]*\[\r\n\])+use \"set\" as in \"set .foo = 5\" to define them." "show convenience"
+gdb_test "show convenience" "\\\$_siginfo = void" "show convenience"
#test show directories
gdb_test "show directories" "Source directories searched: .cdir\[:;\].cwd" "show directories"
#test show editing
### src/gdb/doc/ChangeLog 2009/09/15 18:51:24 1.953
### src/gdb/doc/ChangeLog 2009/09/17 17:49:46 1.954
## -1,3 +1,8 @@
+2009-09-17 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * gdb.texinfo (convenince variables): Mention
+ $_siginfo could be empty.
+
2009-09-15 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (GDB/MI Variable Objects): Document
--- src/gdb/doc/gdb.texinfo 2009/09/15 18:51:25 1.624
+++ src/gdb/doc/gdb.texinfo 2009/09/17 17:49:46 1.625
@@ -7819,8 +7819,10 @@
@item $_siginfo
@vindex $_siginfo@r{, convenience variable}
-The variable @code{$_siginfo} is bound to extra signal information
-inspection (@pxref{extra signal information}).
+The variable @code{$_siginfo} contains extra signal information
+(@pxref{extra signal information}). Note that @code{$_siginfo}
+could be empty, if the application has not yet received any signals.
+For example, it will be empty before you execute the @code{run} command.
@end table
On HP-UX systems, if you refer to a function or variable name that
http://sourceware.org/ml/gdb-cvs/2009-12/msg00128.html
### src/gdb/testsuite/ChangeLog 2009/12/23 23:18:08 1.2054
### src/gdb/testsuite/ChangeLog 2009/12/24 21:57:06 1.2055
## -1,3 +1,10 @@
+2009-12-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix compatibility with G++-4.5.
+ * gdb.cp/expand-sals.cc (main): Remove the "exit-line" comment.
+ * gdb.cp/expand-sals.exp: Remove breakpoint on "exit-line".
+ (uncaught return): Remove.
+
2009-12-23 Jan Kratochvil <jan.kratochvil@redhat.com>
Phil Muldoon <pmuldoon@redhat.com>
--- src/gdb/testsuite/gdb.cp/expand-sals.cc 2009/05/11 15:05:56 1.1
+++ src/gdb/testsuite/gdb.cp/expand-sals.cc 2009/12/24 21:57:06 1.2
@@ -49,5 +49,5 @@
A a;
B b;
- return 0; /* exit-line */
+ return 0;
}
--- src/gdb/testsuite/gdb.cp/expand-sals.exp 2009/05/11 15:05:56 1.1
+++ src/gdb/testsuite/gdb.cp/expand-sals.exp 2009/12/24 21:57:06 1.2
@@ -23,8 +23,6 @@
return -1
}
-gdb_breakpoint [gdb_get_line_number "exit-line"]
-
gdb_breakpoint [gdb_get_line_number "func-line"]
gdb_continue_to_breakpoint "func" ".*func-line.*"
@@ -52,7 +50,3 @@
"bt from A"
gdb_continue_to_breakpoint "next caller func" ".*func-line.*"
-
-# Verify GDB really could not catch any other breakpoint location.
-
-gdb_continue_to_breakpoint "uncaught return" ".*exit-line.*"
http://sourceware.org/ml/gdb-cvs/2009-11/msg00213.html
[ cut ]
--- src/gdb/testsuite/gdb.base/condbreak.exp 2009/01/03 05:58:03 1.13
+++ src/gdb/testsuite/gdb.base/condbreak.exp 2009/11/25 20:43:29 1.14
@@ -207,10 +207,10 @@
setup_xfail hppa2.0w-*-* 11512CLLbs
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker2"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker2"
}
-re "$gdb_prompt $" {
Fix for gfortran-4.1:
-PASS: gdb.mi/mi-var-child-f.exp: mi runto MAIN__
+FAIL: gdb.mi/mi-var-child-f.exp: mi runto MAIN__ (unknown output after running)
RFC: Move language-changed message to verbose
http://sourceware.org/ml/gdb-patches/2009-11/msg00031.html
http://sourceware.org/ml/gdb-cvs/2009-11/msg00034.html
### src/gdb/ChangeLog 2009/11/05 19:53:03 1.11030
### src/gdb/ChangeLog 2009/11/05 20:43:52 1.11031
## -1,3 +1,8 @@
+2009-11-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * top.c (execute_command): Select a frame before checking the current
+ language. Only output a message if verbose.
+
2009-11-05 Tom Tromey <tromey@redhat.com>
* symtab.h (SYMBOL_SET_LINKAGE_NAME): Update comment.
--- src/gdb/top.c 2009/10/19 09:51:42 1.172
+++ src/gdb/top.c 2009/11/05 20:43:52 1.173
@@ -457,10 +457,13 @@
}
- /* Tell the user if the language has changed (except first time). */
+ /* Tell the user if the language has changed (except first time).
+ First make sure that a new frame has been selected, in case this
+ command or the hooks changed the program state. */
+ deprecated_safe_get_selected_frame ();
if (current_language != expected_language)
{
- if (language_mode == language_mode_auto)
+ if (language_mode == language_mode_auto && info_verbose)
{
language_info (1); /* Print what changed. */
}

View File

@ -0,0 +1,77 @@
[ Forward-ported context. ]
http://sourceware.org/ml/gdb-patches/2009-11/msg00170.html
Subject: [patch 03/15] PIE: breakpoint_address_match gdbarch_addr_bit workaround
Hi,
there are already multiple cases of CORE_ADDR being masked by the width of
gdbarch_addr_bit. This specific new case was required the PIE support.
Please read the C comment in attached patch.
Checked that CORE_ADDR math operations are present on 6000+ lines of code of
GDB sources which makes it impossible to do some general fix by replacing all
a->addr < b->addr
by
addr_less_than (a->addr, b->addr)
etc.
Even with this patch I think there are still many bugs left in the operation
of x86_64 gdb debugging i386 targets. Do you find the C++ way as a viable
one?
Thanks,
Jan
gdb/
* breakpoint.c (breakpoint_address_match): New variables addr_bit and
addr_mask, initialize it. Mask addresses by ADDR_MASK.
* defs.h (CORE_ADDR): Extend the comment.
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4559,9 +4559,15 @@ static int
breakpoint_address_match (struct address_space *aspace1, CORE_ADDR addr1,
struct address_space *aspace2, CORE_ADDR addr2)
{
+ int addr_bit = gdbarch_addr_bit (target_gdbarch);
+ CORE_ADDR addr_mask = CORE_ADDR_MAX;
+
+ if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
+ addr_mask = ((CORE_ADDR) 1 << addr_bit) - 1;
+
return ((gdbarch_has_global_breakpoints (target_gdbarch)
|| aspace1 == aspace2)
- && addr1 == addr2);
+ && (addr1 & addr_mask) == (addr2 & addr_mask));
}
/* Assuming LOC1 and LOC2's types' have meaningful target addresses
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -98,7 +98,20 @@
/* A byte from the program being debugged. */
typedef bfd_byte gdb_byte;
-/* An address in the program being debugged. Host byte order. */
+/* An address in the program being debugged. Host byte order.
+
+ Its width is the maximum width of all the supported targets. That means
+ 32-bit target will run on such GDB using 64-bit CORE_ADDR cluttering the
+ bits 32...63 with random data from internal GDB calculations. GDB currently
+ in general truncates the address width only when it is being presented/used
+ externally (such as by the paddress function).
+
+ FIXME: This is still not right as any GDB internal comparisons (such as >=)
+ of CORE_ADDR do not use the properly truncated width. As converting all the
+ CORE_ADDR operations to width-aware functions is not feasible the way out
+ could be a width-aware C++ class CORE_ADDR referencing gdbarch as its
+ constructor parameter. */
+
typedef bfd_vma CORE_ADDR;
/* The largest CORE_ADDR value. */

View File

@ -1,6 +1,8 @@
--- ./gdb/breakpoint.c 2009-12-18 00:13:49.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/breakpoint.c
+++ ./gdb/breakpoint.c 2009-12-18 00:13:16.000000000 +0100 ===================================================================
@@ -8563,6 +8563,49 @@ update_breakpoint_locations (struct brea --- gdb-7.0.50.20100115.orig/gdb/breakpoint.c 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/breakpoint.c 2010-01-15 21:51:20.000000000 +0100
@@ -9167,6 +9167,49 @@ update_breakpoint_locations (struct brea
update_global_location_list (1); update_global_location_list (1);
} }
@ -45,14 +47,16 @@
+ +
+ if (changed) + if (changed)
+ qsort (bp_location, bp_location_count, sizeof (*bp_location), + qsort (bp_location, bp_location_count, sizeof (*bp_location),
+ bp_location_compare_for_qsort); + bp_location_compare);
+} +}
/* Reset a breakpoint given it's struct breakpoint * BINT. /* Reset a breakpoint given it's struct breakpoint * BINT.
The value we return ends up being the return value from catch_errors. The value we return ends up being the return value from catch_errors.
--- ./gdb/breakpoint.h 2009-12-18 00:13:48.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/breakpoint.h
+++ ./gdb/breakpoint.h 2009-12-17 22:11:10.000000000 +0100 ===================================================================
@@ -970,4 +970,7 @@ extern struct breakpoint *get_tracepoint --- gdb-7.0.50.20100115.orig/gdb/breakpoint.h 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/breakpoint.h 2010-01-15 21:50:12.000000000 +0100
@@ -1015,4 +1015,7 @@ extern struct breakpoint *get_tracepoint
is newly allocated; the caller should free when done with it. */ is newly allocated; the caller should free when done with it. */
extern VEC(breakpoint_p) *all_tracepoints (void); extern VEC(breakpoint_p) *all_tracepoints (void);
@ -60,63 +64,19 @@
+ struct section_offsets *delta); + struct section_offsets *delta);
+ +
#endif /* !defined (BREAKPOINT_H) */ #endif /* !defined (BREAKPOINT_H) */
--- ./gdb/objfiles.c 2009-12-18 00:13:48.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/objfiles.c
+++ ./gdb/objfiles.c 2009-12-17 23:19:22.000000000 +0100 ===================================================================
@@ -546,7 +546,7 @@ free_all_objfiles (void) --- gdb-7.0.50.20100115.orig/gdb/objfiles.c 2010-01-15 21:35:13.000000000 +0100
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS +++ gdb-7.0.50.20100115/gdb/objfiles.c 2010-01-15 21:50:45.000000000 +0100
entries in new_offsets. SEPARATE_DEBUG_OBJFILE is not touched here. */ @@ -856,6 +856,11 @@ objfile_relocate1 (struct objfile *objfi
-static void
+static int
objfile_relocate1 (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct obj_section *s;
@@ -565,7 +565,7 @@ objfile_relocate1 (struct objfile *objfi
something_changed = 1;
}
if (!something_changed)
- return;
+ return 0;
}
/* OK, get all the symtabs. */
@@ -706,6 +706,13 @@ objfile_relocate1 (struct objfile *objfi
exec_set_section_address (bfd_get_filename (objfile->obfd), idx,
obj_section_addr (s)); obj_section_addr (s));
} }
+
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if + /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
+ their addresses match. */ + their addresses match. */
+ if (objfile->separate_debug_objfile_backlink == NULL) + if (objfile->separate_debug_objfile_backlink == NULL)
+ breakpoints_relocate (objfile, delta); + breakpoints_relocate (objfile, delta);
+ +
+ return 1; /* Data changed. */
return 1;
} }
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
@@ -720,7 +727,9 @@ objfile_relocate1 (struct objfile *objfi
void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
- objfile_relocate1 (objfile, new_offsets);
+ int changed = 0;
+
+ changed |= objfile_relocate1 (objfile, new_offsets);
if (objfile->separate_debug_objfile != NULL)
{
@@ -747,11 +756,12 @@ objfile_relocate (struct objfile *objfil
objfile_addrs);
do_cleanups (my_cleanups);
- objfile_relocate1 (debug_objfile, new_debug_offsets);
+ changed |= objfile_relocate1 (debug_objfile, new_debug_offsets);
}
/* Relocate breakpoints as necessary, after things are relocated. */
- breakpoint_re_set ();
+ if (changed)
+ breakpoint_re_set ();
}
/* Return non-zero if OBJFILE has partial symbols. */

View File

@ -1,6 +1,8 @@
--- a/gdb/dwarf2read.c Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c ===================================================================
@@ -5754,7 +5754,12 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu) --- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 21:41:32.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 21:42:19.000000000 +0100
@@ -5821,7 +5821,12 @@ read_common_block (struct die_info *die,
{ {
struct attribute *attr; struct attribute *attr;
struct symbol *sym; struct symbol *sym;
@ -14,7 +16,7 @@
attr = dwarf2_attr (die, DW_AT_location, cu); attr = dwarf2_attr (die, DW_AT_location, cu);
if (attr) if (attr)
@@ -5763,6 +5768,7 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu) @@ -5830,6 +5835,7 @@ read_common_block (struct die_info *die,
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
base = decode_locdesc (DW_BLOCK (attr), cu); base = decode_locdesc (DW_BLOCK (attr), cu);
@ -22,7 +24,7 @@
} }
else if (attr_form_is_section_offset (attr)) else if (attr_form_is_section_offset (attr))
{ {
@@ -5824,12 +5830,15 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu) @@ -5891,12 +5897,15 @@ read_common_block (struct die_info *die,
else else
dwarf2_complex_location_expr_complaint (); dwarf2_complex_location_expr_complaint ();
@ -40,7 +42,7 @@
else else
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym)); SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
FIELD_TYPE (*field) = SYMBOL_TYPE (sym); FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
@@ -5843,7 +5852,7 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu) @@ -5910,7 +5919,7 @@ read_common_block (struct die_info *die,
sym = new_symbol (die, type, cu); sym = new_symbol (die, type, cu);
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */ /* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
@ -49,17 +51,19 @@
set_die_type (die, type, cu); set_die_type (die, type, cu);
} }
--- a/gdb/exec.c Index: gdb-7.0.50.20100115/gdb/exec.c
+++ b/gdb/exec.c ===================================================================
@@ -32,6 +32,7 @@ --- gdb-7.0.50.20100115.orig/gdb/exec.c 2010-01-15 21:35:14.000000000 +0100
#include "exec.h" +++ gdb-7.0.50.20100115/gdb/exec.c 2010-01-15 21:47:19.000000000 +0100
#include "observer.h" @@ -34,6 +34,7 @@
#include "arch-utils.h" #include "arch-utils.h"
#include "gdbthread.h"
#include "progspace.h"
+#include "solib.h" +#include "solib.h"
#include <fcntl.h> #include <fcntl.h>
#include "readline/readline.h" #include "readline/readline.h"
@@ -220,6 +221,10 @@ exec_file_attach (char *filename, int from_tty) @@ -225,6 +226,10 @@ exec_file_attach (char *filename, int fr
char *scratch_pathname; char *scratch_pathname;
int scratch_chan; int scratch_chan;
struct target_section *sections = NULL, *sections_end = NULL; struct target_section *sections = NULL, *sections_end = NULL;
@ -70,7 +74,7 @@
scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename, scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename,
write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY, write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY,
@@ -288,12 +293,23 @@ exec_file_attach (char *filename, int from_tty) @@ -293,12 +298,23 @@ exec_file_attach (char *filename, int fr
scratch_pathname, bfd_errmsg (bfd_get_error ())); scratch_pathname, bfd_errmsg (bfd_get_error ()));
} }
@ -94,19 +98,37 @@
- set_gdbarch_from_file (exec_bfd); - set_gdbarch_from_file (exec_bfd);
- -
/* Add the executable's sections to the current address spaces' /* Add the executable's sections to the current address spaces'
list of sections. */ list of sections. This possibly pushes the exec_ops
add_target_sections (sections, sections_end); target. */
--- a/gdb/gdbtypes.h Index: gdb-7.0.50.20100115/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h ===================================================================
@@ -966,6 +966,7 @@ extern void allocate_cplus_struct_type (struct type *); --- gdb-7.0.50.20100115.orig/gdb/gdbtypes.h 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/gdbtypes.h 2010-01-15 21:44:24.000000000 +0100
@@ -406,6 +406,7 @@ enum type_instance_flag_value
enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /* bitpos */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
FIELD_LOC_KIND_PHYSNAME /* physname */
};
@@ -582,6 +583,7 @@ struct main_type
is the location (in the target) of the static field.
Otherwise, physname is the mangled label of the static field. */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
CORE_ADDR physaddr;
char *physname;
}
@@ -1100,6 +1102,7 @@ extern void allocate_gnat_aux_type (stru
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind) #define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos) #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
+/* This address is unrelocated by the objfile's ANOFFSET. */ +/* This address is unrelocated by the objfile's ANOFFSET. */
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \ #define SET_FIELD_BITPOS(thisfld, bitpos) \
@@ -974,6 +975,7 @@ extern void allocate_cplus_struct_type (struct type *); (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
@@ -1107,6 +1110,7 @@ extern void allocate_gnat_aux_type (stru
#define SET_FIELD_PHYSNAME(thisfld, name) \ #define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name)) FIELD_STATIC_PHYSNAME (thisfld) = (name))
@ -114,17 +136,19 @@
#define SET_FIELD_PHYSADDR(thisfld, addr) \ #define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr)) FIELD_STATIC_PHYSADDR (thisfld) = (addr))
@@ -989,6 +991,7 @@ extern void allocate_cplus_struct_type (struct type *); @@ -1119,6 +1123,7 @@ extern void allocate_gnat_aux_type (stru
#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
+/* This address is unrelocated by the objfile's ANOFFSET. */ +/* This address is unrelocated by the objfile's ANOFFSET. */
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n)) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
--- a/gdb/jv-lang.c #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
+++ b/gdb/jv-lang.c Index: gdb-7.0.50.20100115/gdb/jv-lang.c
@@ -416,7 +416,8 @@ java_link_class_type (struct gdbarch *gdbarch, ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/jv-lang.c 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/jv-lang.c 2010-01-15 21:41:58.000000000 +0100
@@ -416,7 +416,8 @@ java_link_class_type (struct gdbarch *gd
fields = NULL; fields = NULL;
nfields--; /* First set up dummy "class" field. */ nfields--; /* First set up dummy "class" field. */
@ -134,7 +158,7 @@
TYPE_FIELD_NAME (type, nfields) = "class"; TYPE_FIELD_NAME (type, nfields) = "class";
TYPE_FIELD_TYPE (type, nfields) = value_type (clas); TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
SET_TYPE_FIELD_PRIVATE (type, nfields); SET_TYPE_FIELD_PRIVATE (type, nfields);
@@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gdbarch, @@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gd
SET_TYPE_FIELD_PROTECTED (type, i); SET_TYPE_FIELD_PROTECTED (type, i);
} }
if (accflags & 0x0008) /* ACC_STATIC */ if (accflags & 0x0008) /* ACC_STATIC */
@ -144,22 +168,13 @@
else else
TYPE_FIELD_BITPOS (type, i) = 8 * boffset; TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */ if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
--- a/gdb/solib-svr4.c Index: gdb-7.0.50.20100115/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c ===================================================================
@@ -1672,15 +1672,20 @@ static CORE_ADDR --- gdb-7.0.50.20100115.orig/gdb/solib-svr4.c 2010-01-15 21:35:16.000000000 +0100
svr4_exec_displacement (void) +++ gdb-7.0.50.20100115/gdb/solib-svr4.c 2010-01-15 21:44:55.000000000 +0100
{ @@ -1689,7 +1689,10 @@ svr4_exec_displacement (void)
int found;
+ /* ENTRY_POINT is a possible function descriptor - before
+ a call to gdbarch_convert_from_func_ptr_addr. */
CORE_ADDR entry_point;
if (exec_bfd == NULL)
return 0;
if (target_auxv_search (&current_target, AT_ENTRY, &entry_point) == 1) if (target_auxv_search (&current_target, AT_ENTRY, &entry_point) == 1)
- return entry_point - exec_entry_point (exec_bfd, &current_target); return entry_point - bfd_get_start_address (exec_bfd);
+ return entry_point - bfd_get_start_address (exec_bfd);
- return svr4_static_exec_displacement (); - return svr4_static_exec_displacement ();
+ if (!ptid_equal (inferior_ptid, null_ptid)) + if (!ptid_equal (inferior_ptid, null_ptid))
@ -169,7 +184,7 @@
} }
/* Relocate the main executable. This function should be called upon /* Relocate the main executable. This function should be called upon
@@ -1632,7 +1635,7 @@ svr4_exec_displacement (void) @@ -1700,7 +1703,7 @@ svr4_exec_displacement (void)
static void static void
svr4_relocate_main_executable (void) svr4_relocate_main_executable (void)
{ {
@ -178,7 +193,7 @@
/* Even if DISPLACEMENT is 0 still try to relocate it as this is a new /* Even if DISPLACEMENT is 0 still try to relocate it as this is a new
difference of in-memory vs. in-file addresses and we could already difference of in-memory vs. in-file addresses and we could already
@@ -1975,6 +1978,7 @@ _initialize_svr4_solib (void) @@ -2054,6 +2057,7 @@ _initialize_svr4_solib (void)
svr4_so_ops.free_so = svr4_free_so; svr4_so_ops.free_so = svr4_free_so;
svr4_so_ops.clear_solib = svr4_clear_solib; svr4_so_ops.clear_solib = svr4_clear_solib;
svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook; svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook;
@ -186,9 +201,11 @@
svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling; svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling;
svr4_so_ops.current_sos = svr4_current_sos; svr4_so_ops.current_sos = svr4_current_sos;
svr4_so_ops.open_symbol_file_object = open_symbol_file_object; svr4_so_ops.open_symbol_file_object = open_symbol_file_object;
--- a/gdb/solib.c Index: gdb-7.0.50.20100115/gdb/solib.c
+++ b/gdb/solib.c ===================================================================
@@ -1014,6 +1014,19 @@ solib_create_inferior_hook (int from_tty) --- gdb-7.0.50.20100115.orig/gdb/solib.c 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/solib.c 2010-01-15 21:41:58.000000000 +0100
@@ -1037,6 +1037,19 @@ solib_create_inferior_hook (int from_tty
ops->solib_create_inferior_hook (from_tty); ops->solib_create_inferior_hook (from_tty);
} }
@ -208,9 +225,11 @@
/* GLOBAL FUNCTION /* GLOBAL FUNCTION
in_solib_dynsym_resolve_code -- check to see if an address is in in_solib_dynsym_resolve_code -- check to see if an address is in
--- a/gdb/solib.h Index: gdb-7.0.50.20100115/gdb/solib.h
+++ b/gdb/solib.h ===================================================================
@@ -43,6 +43,8 @@ extern int solib_read_symbols (struct so_list *, int); --- gdb-7.0.50.20100115.orig/gdb/solib.h 2010-01-08 23:52:04.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/solib.h 2010-01-15 21:42:36.000000000 +0100
@@ -44,6 +44,8 @@ extern int solib_read_symbols (struct so
extern void solib_create_inferior_hook (int from_tty); extern void solib_create_inferior_hook (int from_tty);
@ -218,10 +237,12 @@
+ +
/* If ADDR lies in a shared library, return its name. */ /* If ADDR lies in a shared library, return its name. */
extern char *solib_name_from_address (CORE_ADDR); extern char *solib_name_from_address (struct program_space *, CORE_ADDR);
--- a/gdb/solist.h Index: gdb-7.0.50.20100115/gdb/solist.h
+++ b/gdb/solist.h ===================================================================
@@ -89,6 +89,9 @@ struct target_so_ops --- gdb-7.0.50.20100115.orig/gdb/solist.h 2010-01-08 23:52:04.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/solist.h 2010-01-15 21:41:58.000000000 +0100
@@ -92,6 +92,9 @@ struct target_so_ops
/* Target dependent code to run after child process fork. */ /* Target dependent code to run after child process fork. */
void (*solib_create_inferior_hook) (int from_tty); void (*solib_create_inferior_hook) (int from_tty);
@ -231,9 +252,11 @@
/* Do additional symbol handling, lookup, etc. after symbols /* Do additional symbol handling, lookup, etc. after symbols
for a shared object have been loaded. */ for a shared object have been loaded. */
void (*special_symbol_handling) (void); void (*special_symbol_handling) (void);
--- a/gdb/symfile.c Index: gdb-7.0.50.20100115/gdb/symfile.c
+++ b/gdb/symfile.c ===================================================================
@@ -873,15 +873,36 @@ syms_from_objfile (struct objfile *objfile, --- gdb-7.0.50.20100115.orig/gdb/symfile.c 2010-01-15 21:35:14.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/symfile.c 2010-01-15 21:41:58.000000000 +0100
@@ -832,15 +832,36 @@ syms_from_objfile (struct objfile *objfi
if an error occurs during symbol reading. */ if an error occurs during symbol reading. */
old_chain = make_cleanup_free_objfile (objfile); old_chain = make_cleanup_free_objfile (objfile);
@ -277,9 +300,11 @@
} }
/* Now either addrs or offsets is non-zero. */ /* Now either addrs or offsets is non-zero. */
--- a/gdb/value.c Index: gdb-7.0.50.20100115/gdb/value.c
+++ b/gdb/value.c ===================================================================
@@ -1890,7 +1890,8 @@ value_static_field (struct type *type, int fieldno) --- gdb-7.0.50.20100115.orig/gdb/value.c 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/value.c 2010-01-15 21:41:58.000000000 +0100
@@ -1897,7 +1897,8 @@ value_static_field (struct type *type, i
if (TYPE_FIELD_LOC_KIND (type, fieldno) == FIELD_LOC_KIND_PHYSADDR) if (TYPE_FIELD_LOC_KIND (type, fieldno) == FIELD_LOC_KIND_PHYSADDR)
{ {
retval = value_at (TYPE_FIELD_TYPE (type, fieldno), retval = value_at (TYPE_FIELD_TYPE (type, fieldno),
@ -289,7 +314,7 @@
} }
else else
{ {
@@ -1920,7 +1921,8 @@ value_static_field (struct type *type, int fieldno) @@ -1927,7 +1928,8 @@ value_static_field (struct type *type, i
} }
if (retval && VALUE_LVAL (retval) == lval_memory) if (retval && VALUE_LVAL (retval) == lval_memory)
SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno), SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno),
@ -299,14 +324,3 @@
} }
return retval; return retval;
} }
--- gdb-7.0/gdb/testsuite/gdb.base/valgrind-db-attach.exp-orig 2009-12-21 16:50:42.000000000 +0100
+++ gdb-7.0/gdb/testsuite/gdb.base/valgrind-db-attach.exp 2009-12-21 16:51:24.000000000 +0100
@@ -67,6 +67,8 @@ gdb_test_multiple "" $test {
}
}
+gdb_test "" "" "eat first prompt"
+
# Initialization from default_gdb_start.
gdb_test "set height 0"
gdb_test "set width 0"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,101 +0,0 @@
http://sourceware.org/ml/gdb-patches/2010-01/msg00030.html
Subject: [patch] Re: Regression: field type preservation: 7.0 -> 7.0.1+HEAD
On Friday 01 January 2010 21:45:05 Jan Kratochvil wrote:
> -PASS: gdb.mi/mi-var-child.exp: get children of struct_declarations.s2.u2.u1s1
> +FAIL: gdb.mi/mi-var-child.exp: get children of struct_declarations.s2.u2.u1s1
> -PASS: gdb.mi/mi2-var-child.exp: get children of struct_declarations.s2.u2.u1s1
> +FAIL: gdb.mi/mi2-var-child.exp: get children of struct_declarations.s2.u2.u1s1
> -PASS: gdb.python/py-mi.exp: examine container children=0, no pretty-printing
> +FAIL: gdb.python/py-mi.exp: examine container children=0, no pretty-printing
>
> due to:
> Re: RFA: unbreak typedefed bitfield
> http://sourceware.org/ml/gdb-patches/2009-12/msg00295.html
> commit fc85da4ee2a7c32afc53b1b334a4f84e2e9bd84e
> http://sourceware.org/ml/gdb-cvs/2009-12/msg00100.html
attached a fix on top of existing HEAD.
Original PR gdb/10884 was a regression 6.8 -> 7.0 due to:
RFC: Lazy bitfields
http://sourceware.org/ml/gdb-patches/2009-07/msg00437.html
http://sourceware.org/ml/gdb-cvs/2009-07/msg00143.html
07491b3409f6ace0b7a9a707775a56ce10fece1c
No regressions for HEAD on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu. Plus:
-FAIL: gdb.mi/mi-var-child.exp: get children of struct_declarations.s2.u2.u1s1
+PASS: gdb.mi/mi-var-child.exp: get children of struct_declarations.s2.u2.u1s1
-FAIL: gdb.mi/mi2-var-child.exp: get children of struct_declarations.s2.u2.u1s1
+PASS: gdb.mi/mi2-var-child.exp: get children of struct_declarations.s2.u2.u1s1
-FAIL: gdb.python/py-mi.exp: examine container children=0, no pretty-printing
+PASS: gdb.python/py-mi.exp: examine container children=0, no pretty-printing
Going to check it in also for gdb_7_0-branch after an approval.
Thanks,
Jan
gdb/
2010-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* value.c (value_primitive_field): Remove one check_typedef call.
Move bitpos and container_bitsize initialization after
allocate_value_lazy. New comment before accessing TYPE_LENGTH.
gdb/testsuite/
2010-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.mi/var-cmd.c (do_bitfield_tests): Change "V.sharable" type to
"uint_for_mi_testing".
--- a/gdb/testsuite/gdb.mi/var-cmd.c
+++ b/gdb/testsuite/gdb.mi/var-cmd.c
@@ -494,7 +494,7 @@ void do_bitfield_tests ()
mi_create_varobj V d "create varobj for Data"
mi_list_varobj_children "V" {
{"V.alloc" "alloc" "0" "int"}
- {"V.sharable" "sharable" "0" "unsigned int"}
+ {"V.sharable" "sharable" "0" "uint_for_mi_testing"}
} "list children of Data"
mi_check_varobj_value V.sharable 3 "access bitfield"
:*/
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1873,7 +1873,6 @@ value_primitive_field (struct value *arg1, int offset,
CHECK_TYPEDEF (arg_type);
type = TYPE_FIELD_TYPE (arg_type, fieldno);
- type = check_typedef (type);
/* Handle packed fields */
@@ -1885,10 +1884,14 @@ value_primitive_field (struct value *arg1, int offset,
Otherwise, adjust offset to the byte containing the first
bit. Assume that the address, offset, and embedded offset
are sufficiently aligned. */
- int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
- int container_bitsize = TYPE_LENGTH (type) * 8;
+ int bitpos, container_bitsize;
v = allocate_value_lazy (type);
+
+ /* TYPE_LENGTH of TYPE gets initialized by allocate_value_lazy. */
+ bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
+ container_bitsize = TYPE_LENGTH (type) * 8;
+
v->bitsize = TYPE_FIELD_BITSIZE (arg_type, fieldno);
if ((bitpos % container_bitsize) + v->bitsize <= container_bitsize
&& TYPE_LENGTH (type) <= (int) sizeof (LONGEST))
@@ -1939,6 +1942,8 @@ value_primitive_field (struct value *arg1, int offset,
else
{
v = allocate_value (type);
+
+ /* TYPE_LENGTH of TYPE gets initialized by allocate_value. */
memcpy (value_contents_raw (v),
value_contents_raw (arg1) + offset,
TYPE_LENGTH (type));

View File

@ -1,137 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-10/msg00509.html
Subject: [patch 2/3] find_separate_debug_file cleanup
Hi,
current code was:
* difficult to maintain as a new variable required xfree on many places
* was causing memory corruptions due to silently misapplied 3rd party patches
as the close code fragments unfortunately match patch context
Thanks,
Jan
gdb/
2009-10-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* symfile.c (find_separate_debug_file): Initialize dir, debugfile and
canon_name to NULL. Change alloca to xmalloc, newly call xfree for it.
New label cleanup_return_debugfile, jump to it from the failure paths.
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1333,11 +1333,10 @@ static char *
find_separate_debug_file (struct objfile *objfile)
{
asection *sect;
- char *basename;
- char *dir;
- char *debugfile;
- char *name_copy;
- char *canon_name;
+ char *basename, *name_copy;
+ char *dir = NULL;
+ char *debugfile = NULL;
+ char *canon_name = NULL;
bfd_size_type debuglink_size;
unsigned long crc32;
int i;
@@ -1366,7 +1365,7 @@ find_separate_debug_file (struct objfile *objfile)
if (basename == NULL)
/* There's no separate debug info, hence there's no way we could
load it => no warning. */
- return NULL;
+ goto cleanup_return_debugfile;
dir = xstrdup (objfile->name);
@@ -1388,24 +1387,19 @@ find_separate_debug_file (struct objfile *objfile)
if (canon_name && strlen (canon_name) > i)
i = strlen (canon_name);
- debugfile = alloca (strlen (debug_file_directory) + 1
- + i
- + strlen (DEBUG_SUBDIRECTORY)
- + strlen ("/")
- + strlen (basename)
- + 1);
+ debugfile = xmalloc (strlen (debug_file_directory) + 1
+ + i
+ + strlen (DEBUG_SUBDIRECTORY)
+ + strlen ("/")
+ + strlen (basename)
+ + 1);
/* First try in the same directory as the original file. */
strcpy (debugfile, dir);
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
strcpy (debugfile, dir);
@@ -1414,12 +1408,7 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* Then try in the global debugfile directory. */
strcpy (debugfile, debug_file_directory);
@@ -1428,12 +1417,7 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* If the file is in the sysroot, try using its base path in the
global debugfile directory. */
@@ -1447,20 +1431,17 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (canon_name);
- xfree (basename);
- xfree (dir);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
}
- if (canon_name)
- xfree (canon_name);
+ xfree (debugfile);
+ debugfile = NULL;
+cleanup_return_debugfile:
+ xfree (canon_name);
xfree (basename);
xfree (dir);
- return NULL;
+ return debugfile;
}

View File

@ -1,271 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-10/msg00508.html
Subject: [patch 3/3] debug-file-directory with multiple components
Hi,
for various reasons `debug-file-directory' would be sometimes useful to have
multiple components such as `solib-search-path' has.
I found it useful myself during various separate debuginfo tests/scripts.
It was requested for the ABRT bugreporting project at the preceding mail of:
https://fedorahosted.org/pipermail/crash-catcher/2009-October/000054.html
It should be a backward compatible extension as DIRNAME_SEPARATOR should never
be a valid part of a single DEBUG_FILE_DIRECTORY component.
Thanks,
Jan
gdb/doc/
2009-10-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (set debug-file-directory, show debug-file-directory)
(Auto-loading): Use plural and note one can use multiple components now.
gdb/
2009-10-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* symfile.c (build_id_to_debug_filename): New variable debugdir. Move
variables size, s and data into a new inner block. Change xmalloc for
alloca, use direct BUILDID->SIZE there now. Loop for the
DEBUG_FILE_DIRECTORY components.
(find_separate_debug_file): New variable debugdir and debugdir_end.
Loop for the DEBUG_FILE_DIRECTORY components.
(_initialize_symfile): For "debug-file-directory" use plural and note
one can use multiple components now.
gdb/testsuite/
2009-10-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/sepdebug.exp: New test_different_dir call for multiple-dirs.
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -14066,13 +14066,14 @@ name @value{GDBN} is currently using.
@table @code
@kindex set debug-file-directory
-@item set debug-file-directory @var{directory}
-Set the directory which @value{GDBN} searches for separate debugging
-information files to @var{directory}.
+@item set debug-file-directory @var{directories}
+Set the directories which @value{GDBN} searches for separate debugging
+information files to @var{directory}. Multiple directory components can be set
+concatenating them by a directory separator.
@kindex show debug-file-directory
@item show debug-file-directory
-Show the directory @value{GDBN} searches for separate debugging
+Show the directories @value{GDBN} searches for separate debugging
information files.
@end table
@@ -19336,8 +19337,8 @@ readable, @value{GDBN} will evaluate it as a Python script.
If this file does not exist, and if the parameter
@code{debug-file-directory} is set (@pxref{Separate Debug Files}),
-then @value{GDBN} will use the file named
-@file{@var{debug-file-directory}/@var{real-name}}, where
+then @value{GDBN} will use for its each separated directory component
+@code{component} the file named @file{@code{component}/@var{real-name}}, where
@var{real-name} is the object file's real name, as described above.
Finally, if this file does not exist, then @value{GDBN} will look for
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1218,35 +1218,59 @@ build_id_verify (const char *filename, struct build_id *check)
static char *
build_id_to_debug_filename (struct build_id *build_id)
{
- char *link, *s, *retval = NULL;
- gdb_byte *data = build_id->data;
- size_t size = build_id->size;
+ char *link, *debugdir, *retval = NULL;
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
- link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
- + 2 * size + (sizeof ".debug" - 1) + 1);
- s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
- if (size > 0)
- {
- size--;
- s += sprintf (s, "%02x", (unsigned) *data++);
- }
- if (size > 0)
- *s++ = '/';
- while (size-- > 0)
- s += sprintf (s, "%02x", (unsigned) *data++);
- strcpy (s, ".debug");
-
- /* lrealpath() is expensive even for the usually non-existent files. */
- if (access (link, F_OK) == 0)
- retval = lrealpath (link);
- xfree (link);
-
- if (retval != NULL && !build_id_verify (retval, build_id))
+ link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
+ + 2 * build_id->size + (sizeof ".debug" - 1) + 1);
+
+ /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
+ cause "/.build-id/..." lookups. */
+
+ debugdir = debug_file_directory;
+ do
{
- xfree (retval);
- retval = NULL;
+ char *s, *debugdir_end;
+ gdb_byte *data = build_id->data;
+ size_t size = build_id->size;
+
+ while (*debugdir == DIRNAME_SEPARATOR)
+ debugdir++;
+
+ debugdir_end = strchr (debugdir, DIRNAME_SEPARATOR);
+ if (debugdir_end == NULL)
+ debugdir_end = &debugdir[strlen (debugdir)];
+
+ memcpy (link, debugdir, debugdir_end - debugdir);
+ s = &link[debugdir_end - debugdir];
+ s += sprintf (s, "/.build-id/");
+ if (size > 0)
+ {
+ size--;
+ s += sprintf (s, "%02x", (unsigned) *data++);
+ }
+ if (size > 0)
+ *s++ = '/';
+ while (size-- > 0)
+ s += sprintf (s, "%02x", (unsigned) *data++);
+ strcpy (s, ".debug");
+
+ /* lrealpath() is expensive even for the usually non-existent files. */
+ if (access (link, F_OK) == 0)
+ retval = lrealpath (link);
+
+ if (retval != NULL && !build_id_verify (retval, build_id))
+ {
+ xfree (retval);
+ retval = NULL;
+ }
+
+ if (retval != NULL)
+ break;
+
+ debugdir = debugdir_end;
}
+ while (*debugdir != 0);
return retval;
}
@@ -1333,7 +1357,7 @@ static char *
find_separate_debug_file (struct objfile *objfile)
{
asection *sect;
- char *basename, *name_copy;
+ char *basename, *name_copy, *debugdir;
char *dir = NULL;
char *debugfile = NULL;
char *canon_name = NULL;
@@ -1410,29 +1434,51 @@ find_separate_debug_file (struct objfile *objfile)
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
goto cleanup_return_debugfile;
- /* Then try in the global debugfile directory. */
- strcpy (debugfile, debug_file_directory);
- strcat (debugfile, "/");
- strcat (debugfile, dir);
- strcat (debugfile, basename);
-
- if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- goto cleanup_return_debugfile;
+ /* Then try in the global debugfile directories.
+
+ Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
+ cause "/..." lookups. */
- /* If the file is in the sysroot, try using its base path in the
- global debugfile directory. */
- if (canon_name
- && strncmp (canon_name, gdb_sysroot, strlen (gdb_sysroot)) == 0
- && IS_DIR_SEPARATOR (canon_name[strlen (gdb_sysroot)]))
+ debugdir = debug_file_directory;
+ do
{
- strcpy (debugfile, debug_file_directory);
- strcat (debugfile, canon_name + strlen (gdb_sysroot));
+ char *debugdir_end;
+
+ while (*debugdir == DIRNAME_SEPARATOR)
+ debugdir++;
+
+ debugdir_end = strchr (debugdir, DIRNAME_SEPARATOR);
+ if (debugdir_end == NULL)
+ debugdir_end = &debugdir[strlen (debugdir)];
+
+ memcpy (debugfile, debugdir, debugdir_end - debugdir);
+ debugfile[debugdir_end - debugdir] = 0;
strcat (debugfile, "/");
+ strcat (debugfile, dir);
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
goto cleanup_return_debugfile;
+
+ /* If the file is in the sysroot, try using its base path in the
+ global debugfile directory. */
+ if (canon_name
+ && strncmp (canon_name, gdb_sysroot, strlen (gdb_sysroot)) == 0
+ && IS_DIR_SEPARATOR (canon_name[strlen (gdb_sysroot)]))
+ {
+ memcpy (debugfile, debugdir, debugdir_end - debugdir);
+ debugfile[debugdir_end - debugdir] = 0;
+ strcat (debugfile, canon_name + strlen (gdb_sysroot));
+ strcat (debugfile, "/");
+ strcat (debugfile, basename);
+
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
+ goto cleanup_return_debugfile;
+ }
+
+ debugdir = debugdir_end;
}
+ while (*debugdir != 0);
xfree (debugfile);
debugfile = NULL;
@@ -4173,12 +4219,12 @@ Usage: set extension-language .foo bar"),
add_setshow_optional_filename_cmd ("debug-file-directory", class_support,
&debug_file_directory, _("\
-Set the directory where separate debug symbols are searched for."), _("\
-Show the directory where separate debug symbols are searched for."), _("\
+Set the directories where separate debug symbols are searched for."), _("\
+Show the directories where separate debug symbols are searched for."), _("\
Separate debug symbols are first searched for in the same\n\
directory as the binary, then in the `" DEBUG_SUBDIRECTORY "' subdirectory,\n\
and lastly at the path of the directory of the binary with\n\
-the global debug-file directory prepended."),
+each global debug-file-directory component prepended."),
NULL,
show_debug_file_directory,
&setlist, &showlist);
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -995,6 +995,12 @@ if ![string compare $build_id_debug_filename ""] then {
test_different_dir build-id "${objdir}/${subdir}" $xfail
+ # Test also multiple directories can be specified. Without the build-id
+ # reference GDB would find the separate debug info just at the same
+ # location as the executable file.
+
+ test_different_dir multiple-dirs "/doesnotexist:${objdir}/${subdir}" $xfail
+
# Spare debug files may confuse testsuite runs in the future.
remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}"
}

View File

@ -1,151 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-10/msg00507.html
Subject: [patch 1/3] print the .debug file name having CRC mismatch
Hi,
this patch is left as is from Andrew Cagney.
Thanks,
Jan
gdb/
2005-04-02 Andrew Cagney <cagney@gnu.org>
* symfile.c (separate_debug_file_exists): When the CRCs mismatch
print a warning.
(find_separate_debug_file): Pass in the objfile's name.
gdb/testsuite/
2009-10-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/sepdebug.exp (CRC mismatch is reported): New test.
* gdb.base/sepdebug2.c: New file.
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1283,7 +1283,8 @@ get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
}
static int
-separate_debug_file_exists (const char *name, unsigned long crc)
+separate_debug_file_exists (const char *name, unsigned long crc,
+ const char *parent_name)
{
unsigned long file_crc = 0;
bfd *abfd;
@@ -1303,7 +1304,15 @@ separate_debug_file_exists (const char *name, unsigned long crc)
bfd_close (abfd);
- return crc == file_crc;
+ if (crc != file_crc)
+ {
+ warning (_("the debug information found in \"%s\""
+ " does not match \"%s\" (CRC mismatch).\n"),
+ name, parent_name);
+ return 0;
+ }
+
+ return 1;
}
char *debug_file_directory = NULL;
@@ -1355,6 +1364,8 @@ find_separate_debug_file (struct objfile *objfile)
basename = get_debug_link_info (objfile, &crc32);
if (basename == NULL)
+ /* There's no separate debug info, hence there's no way we could
+ load it => no warning. */
return NULL;
dir = xstrdup (objfile->name);
@@ -1388,7 +1399,7 @@ find_separate_debug_file (struct objfile *objfile)
strcpy (debugfile, dir);
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1402,7 +1413,7 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, "/");
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1416,7 +1427,7 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, dir);
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1435,7 +1446,7 @@ find_separate_debug_file (struct objfile *objfile)
strcat (debugfile, "/");
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (canon_name);
xfree (basename);
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -952,6 +952,23 @@ set debugfile "${objdir}/${subdir}/${testfile}.debug"
test_different_dir debuglink "${objdir}/${subdir}" 0
+# Test CRC mismatch is reported.
+
+if {[build_executable sepdebug.exp sepdebug2 sepdebug2.c debug] != -1
+ && ![gdb_gnu_strip_debug ${objdir}/${subdir}/sepdebug2]} {
+
+ remote_exec build "cp ${debugfile} ${objdir}/${subdir}/.debug/sepdebug2.debug"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+
+ set escapedobjdirsubdir [string_to_regexp ${objdir}/${subdir}]
+
+ gdb_test "file ${objdir}/${subdir}/sepdebug2" "warning: the debug information found in \"${escapedobjdirsubdir}/\\.debug/sepdebug2\\.debug\" does not match \"${escapedobjdirsubdir}/sepdebug2\" \\(CRC mismatch\\)\\..*\\(no debugging symbols found\\).*" "CRC mismatch is reported"
+}
+
+
# NT_GNU_BUILD_ID / .note.gnu.build-id test:
set build_id_debug_filename [build_id_debug_filename_get $binfile]
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sepdebug2.c
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+int
+main (void)
+{
+ return 0;
+}

View File

@ -1,317 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-12/msg00180.html
Subject: [patch] Fix a regression by me on breakpoint-cond-infcall
Hi,
GDB has now a regression since:
Re: [patch] Performance optimize large bp_location count
http://sourceware.org/ml/gdb-patches/2009-10/msg00632.html
=
2009-10-25 Jan Kratochvil <jan.kratochvil@redhat.com>
Performance optimize large bp_location count.
on breakpoints with conditions calling inferior.
Bringing the code back to the state before my acceleration patch.
The code before already assumed no breakpoints or their bp_locations can
change across the inferior call which should be true - trying to do some:
break a if b()
break b
command 1
delete 2
end
or similar cannot work as inside "if b()" evaluation no breakpoints can be
added or removed.
update_global_location_list also does not removed/add `struct bp_location's
themselves but only pointers to them in the bp_location array. As the new
iteration no longer uses the bp_location array it is no longer a problem.
Original problem was found by and fixed differently by Phil Muldoon.
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
Thanks,
Jan
gdb/
2009-12-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (bpstat_stop_status): Iterate using ALL_BREAKPOINTS and
the B->LOC list. Remove gdb_assert on B. Change bp_hardware_watchpoint
continue to break. Remove variable update_locations. Remove HIT_COUNT
increment protection by an ENABLE_STATE check. Inline the delayed
update_global_location_list call.
gdb/testsuite/
2009-12-13 Jan Kratochvil <jan.kratochvil@redhat.com>
Phil Muldoon <pmuldoon@redhat.com>
* gdb.base/condbreak.exp: Put breakpoint on marker3 and marker4.
(bp_location13, bp_location14, bp_location17, bp_location18)
(marker3_proto, marker4_proto): New variables.
(breakpoint info): Update output.
(run until breakpoint at marker3, run until breakpoint at marker4): New
tests.
[ Backported for F-12. ]
--- ./gdb/breakpoint.c 2009-12-14 00:25:55.000000000 +0100
+++ ./gdb/breakpoint.c 2009-12-14 00:32:32.000000000 +0100
@@ -3298,93 +3298,93 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
/* Pointer to the last thing in the chain currently. */
bpstat bs = root_bs;
int ix;
- int need_remove_insert, update_locations = 0;
+ int need_remove_insert;
- ALL_BP_LOCATIONS (bl, blp_tmp)
- {
- bpstat bs_prev = bs;
+ /* ALL_BP_LOCATIONS iteration would break across
+ update_global_location_list possibly executed by
+ bpstat_check_breakpoint_conditions's inferior call. */
- b = bl->owner;
- gdb_assert (b);
- if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
- continue;
-
- /* For hardware watchpoints, we look only at the first location.
- The watchpoint_check function will work on entire expression,
- not the individual locations. For read watchopints, the
- watchpoints_triggered function have checked all locations
- alrea
- */
- if (b->type == bp_hardware_watchpoint && bl != b->loc)
- continue;
-
- if (!bpstat_check_location (bl, bp_addr))
- continue;
-
- /* Come here if it's a watchpoint, or if the break address matches */
-
- bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
- gdb_assert (bs_prev->next == bs);
-
- /* Assume we stop. Should we find watchpoint that is not actually
- triggered, or if condition of breakpoint is false, we'll reset
- 'stop' to 0. */
- bs->stop = 1;
- bs->print = 1;
+ ALL_BREAKPOINTS (b)
+ {
+ if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
+ continue;
- if (!bpstat_check_watchpoint (bs))
- {
- /* Ensure bpstat_explains_signal stays false if this BL could not be
- the cause of this trap. */
+ for (bl = b->loc; bl != NULL; bl = bl->next)
+ {
+ bpstat bs_prev = bs;
+
+ /* For hardware watchpoints, we look only at the first location.
+ The watchpoint_check function will work on entire expression,
+ not the individual locations. For read watchopints, the
+ watchpoints_triggered function have checked all locations
+ alrea
+ */
+ if (b->type == bp_hardware_watchpoint && bl != b->loc)
+ break;
- gdb_assert (bs->print_it == print_it_noop);
- gdb_assert (!bs->stop);
- xfree (bs);
- bs = bs_prev;
- bs->next = NULL;
- continue;
- }
+ if (!bpstat_check_location (bl, bp_addr))
+ continue;
- if (b->type == bp_thread_event || b->type == bp_overlay_event
- || b->type == bp_longjmp_master || b->type == bp_exception_master)
- /* We do not stop for these. */
- bs->stop = 0;
- else
- bpstat_check_breakpoint_conditions (bs, ptid);
-
- if (bs->stop)
- {
- if (b->enable_state != bp_disabled)
- ++(b->hit_count);
+ /* Come here if it's a watchpoint, or if the break address matches */
- /* We will stop here */
- if (b->disposition == disp_disable)
- {
- if (b->enable_state != bp_permanent)
- b->enable_state = bp_disabled;
- update_locations = 1;
- }
- if (b->silent)
- bs->print = 0;
- bs->commands = b->commands;
- if (bs->commands
- && (strcmp ("silent", bs->commands->line) == 0
- || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
- {
- bs->commands = bs->commands->next;
- bs->print = 0;
- }
- bs->commands = copy_command_lines (bs->commands);
- }
+ bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
+ gdb_assert (bs_prev->next == bs);
- /* Print nothing for this entry if we dont stop or if we dont print. */
- if (bs->stop == 0 || bs->print == 0)
- bs->print_it = print_it_noop;
- }
+ /* Assume we stop. Should we find watchpoint that is not actually
+ triggered, or if condition of breakpoint is false, we'll reset
+ 'stop' to 0. */
+ bs->stop = 1;
+ bs->print = 1;
- /* Delay this call which would break the ALL_BP_LOCATIONS iteration above. */
- if (update_locations)
- update_global_location_list (0);
+ if (!bpstat_check_watchpoint (bs))
+ {
+ /* Ensure bpstat_explains_signal stays false if this BL could not be
+ the cause of this trap. */
+
+ gdb_assert (bs->print_it == print_it_noop);
+ gdb_assert (!bs->stop);
+ xfree (bs);
+ bs = bs_prev;
+ bs->next = NULL;
+ continue;
+ }
+
+ if (b->type == bp_thread_event || b->type == bp_overlay_event
+ || b->type == bp_longjmp_master || b->type == bp_exception_master)
+ /* We do not stop for these. */
+ bs->stop = 0;
+ else
+ bpstat_check_breakpoint_conditions (bs, ptid);
+
+ if (bs->stop)
+ {
+ ++(b->hit_count);
+
+ /* We will stop here */
+ if (b->disposition == disp_disable)
+ {
+ if (b->enable_state != bp_permanent)
+ b->enable_state = bp_disabled;
+ update_global_location_list (0);
+ }
+ if (b->silent)
+ bs->print = 0;
+ bs->commands = b->commands;
+ if (bs->commands
+ && (strcmp ("silent", bs->commands->line) == 0
+ || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
+ {
+ bs->commands = bs->commands->next;
+ bs->print = 0;
+ }
+ bs->commands = copy_command_lines (bs->commands);
+ }
+
+ /* Print nothing for this entry if we dont stop or if we dont print. */
+ if (bs->stop == 0 || bs->print == 0)
+ bs->print_it = print_it_noop;
+ }
+ }
for (ix = 0; VEC_iterate (bp_location_p, moribund_locations, ix, loc); ++ix)
{
--- ./gdb/testsuite/gdb.base/condbreak.exp 2009-01-03 06:58:03.000000000 +0100
+++ ./gdb/testsuite/gdb.base/condbreak.exp 2009-12-14 00:27:21.000000000 +0100
@@ -68,8 +68,12 @@ set bp_location1 [gdb_get_line_number "
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
+set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
+set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
#
# test break at function
@@ -110,15 +114,29 @@ gdb_test "break marker2 if (a==43)" \
"Breakpoint.*at.* file .*$srcfile1, line.*"
#
+# Check break involving inferior function call.
+# Ensure there is at least one additional breakpoint with higher VMA.
+#
+gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
+gdb_test "break marker4" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
+
+#
# check to see what breakpoints are set
#
if {$hp_aCC_compiler} {
set marker1_proto "\\(void\\)"
set marker2_proto "\\(int\\)"
+ # Not checked.
+ set marker3_proto "\\(char \\*, char \\*\\)"
+ set marker4_proto "\\(long\\)"
} else {
set marker1_proto ""
set marker2_proto ""
+ set marker3_proto ""
+ set marker4_proto ""
}
gdb_test "info break" \
@@ -129,7 +147,10 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[\t \]+stop only if \\(1==1\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
-\[\t \]+stop only if \\(a==43\\).*" \
+\[\t \]+stop only if \\(a==43\\).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).*
+\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \
"breakpoint info"
@@ -220,3 +241,23 @@ gdb_expect {
fail "(timeout) run until breakpoint at marker2"
}
}
+
+set test "run until breakpoint at marker3"
+gdb_test_multiple "continue" $test {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
+ xfail $test
+ }
+}
+
+set test "run until breakpoint at marker4"
+gdb_test_multiple "continue" $test {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
+ xfail $test
+ }
+}

View File

@ -32,11 +32,11 @@ gdb/testsuite/
* gdb.base/gnu-ifunc-lib.c, gdb.base/gnu-ifunc.c, * gdb.base/gnu-ifunc-lib.c, gdb.base/gnu-ifunc.c,
gdb.base/gnu-ifunc.exp: New. gdb.base/gnu-ifunc.exp: New.
Index: gdb-7.0/gdb/elfread.c Index: gdb-7.0.50.20100115/gdb/elfread.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/elfread.c 2009-11-25 10:24:45.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/elfread.c 2010-01-15 11:45:34.000000000 +0100
+++ gdb-7.0/gdb/elfread.c 2009-11-25 10:25:50.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/elfread.c 2010-01-15 12:17:16.000000000 +0100
@@ -168,7 +168,8 @@ record_minimal_symbol (char *name, CORE_ @@ -184,7 +184,8 @@ record_minimal_symbol (const char *name,
{ {
struct gdbarch *gdbarch = get_objfile_arch (objfile); struct gdbarch *gdbarch = get_objfile_arch (objfile);
@ -45,8 +45,8 @@ Index: gdb-7.0/gdb/elfread.c
+ || ms_type == mst_text_gnu_ifunc) + || ms_type == mst_text_gnu_ifunc)
address = gdbarch_smash_text_address (gdbarch, address); address = gdbarch_smash_text_address (gdbarch, address);
return prim_record_minimal_symbol_and_info return prim_record_minimal_symbol_full (name, name_len, copy_name, address,
@@ -373,7 +374,10 @@ elf_symtab_read (struct objfile *objfile @@ -393,7 +394,10 @@ elf_symtab_read (struct objfile *objfile
{ {
if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
{ {
@ -58,11 +58,11 @@ Index: gdb-7.0/gdb/elfread.c
} }
else if ((sym->name[0] == '.' && sym->name[1] == 'L') else if ((sym->name[0] == '.' && sym->name[1] == 'L')
|| ((sym->flags & BSF_LOCAL) || ((sym->flags & BSF_LOCAL)
Index: gdb-7.0/gdb/gdbtypes.c Index: gdb-7.0.50.20100115/gdb/gdbtypes.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/gdbtypes.c 2009-11-25 10:24:47.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/gdbtypes.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0/gdb/gdbtypes.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/gdbtypes.c 2010-01-15 12:16:49.000000000 +0100
@@ -1904,6 +1904,8 @@ init_type (enum type_code code, int leng @@ -1946,6 +1946,8 @@ init_type (enum type_code code, int leng
TYPE_NOTTEXT (type) = 1; TYPE_NOTTEXT (type) = 1;
if (flags & TYPE_FLAG_FIXED_INSTANCE) if (flags & TYPE_FLAG_FIXED_INSTANCE)
TYPE_FIXED_INSTANCE (type) = 1; TYPE_FIXED_INSTANCE (type) = 1;
@ -71,7 +71,7 @@ Index: gdb-7.0/gdb/gdbtypes.c
if (name) if (name)
TYPE_NAME (type) = obsavestring (name, strlen (name), TYPE_NAME (type) = obsavestring (name, strlen (name),
@@ -3762,6 +3764,8 @@ gdbtypes_post_init (struct gdbarch *gdba @@ -3846,6 +3848,8 @@ gdbtypes_post_init (struct gdbarch *gdba
= lookup_pointer_type (builtin_type->builtin_void); = lookup_pointer_type (builtin_type->builtin_void);
builtin_type->builtin_func_ptr builtin_type->builtin_func_ptr
= lookup_pointer_type (lookup_function_type (builtin_type->builtin_void)); = lookup_pointer_type (lookup_function_type (builtin_type->builtin_void));
@ -80,7 +80,7 @@ Index: gdb-7.0/gdb/gdbtypes.c
/* This type represents a GDB internal function. */ /* This type represents a GDB internal function. */
builtin_type->internal_fn builtin_type->internal_fn
@@ -3878,6 +3882,11 @@ objfile_type (struct objfile *objfile) @@ -3962,6 +3966,11 @@ objfile_type (struct objfile *objfile)
"<text variable, no debug info>", objfile); "<text variable, no debug info>", objfile);
TYPE_TARGET_TYPE (objfile_type->nodebug_text_symbol) TYPE_TARGET_TYPE (objfile_type->nodebug_text_symbol)
= objfile_type->builtin_int; = objfile_type->builtin_int;
@ -92,11 +92,11 @@ Index: gdb-7.0/gdb/gdbtypes.c
objfile_type->nodebug_data_symbol objfile_type->nodebug_data_symbol
= init_type (TYPE_CODE_INT, = init_type (TYPE_CODE_INT,
gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0, gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
Index: gdb-7.0/gdb/gdbtypes.h Index: gdb-7.0.50.20100115/gdb/gdbtypes.h
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/gdbtypes.h 2009-11-25 10:24:48.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/gdbtypes.h 2010-01-15 11:49:26.000000000 +0100
+++ gdb-7.0/gdb/gdbtypes.h 2009-11-25 10:25:17.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/gdbtypes.h 2010-01-15 12:16:49.000000000 +0100
@@ -187,6 +187,7 @@ enum type_flag_value @@ -188,6 +188,7 @@ enum type_flag_value
TYPE_FLAG_FIXED_INSTANCE = (1 << 15), TYPE_FLAG_FIXED_INSTANCE = (1 << 15),
TYPE_FLAG_STUB_SUPPORTED = (1 << 16), TYPE_FLAG_STUB_SUPPORTED = (1 << 16),
TYPE_FLAG_NOTTEXT = (1 << 17), TYPE_FLAG_NOTTEXT = (1 << 17),
@ -104,7 +104,7 @@ Index: gdb-7.0/gdb/gdbtypes.h
/* Used for error-checking. */ /* Used for error-checking. */
TYPE_FLAG_MIN = TYPE_FLAG_UNSIGNED TYPE_FLAG_MIN = TYPE_FLAG_UNSIGNED
@@ -292,6 +293,12 @@ enum type_instance_flag_value @@ -293,6 +294,12 @@ enum type_instance_flag_value
#define TYPE_NOTTEXT(t) (TYPE_MAIN_TYPE (t)->flag_nottext) #define TYPE_NOTTEXT(t) (TYPE_MAIN_TYPE (t)->flag_nottext)
@ -117,7 +117,7 @@ Index: gdb-7.0/gdb/gdbtypes.h
/* Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by /* Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by
the objfile retrieved as TYPE_OBJFILE. Otherweise, the type is the objfile retrieved as TYPE_OBJFILE. Otherweise, the type is
owned by an architecture; TYPE_OBJFILE is NULL in this case. */ owned by an architecture; TYPE_OBJFILE is NULL in this case. */
@@ -427,6 +434,7 @@ struct main_type @@ -447,6 +454,7 @@ struct main_type
unsigned int flag_vector : 1; unsigned int flag_vector : 1;
unsigned int flag_stub_supported : 1; unsigned int flag_stub_supported : 1;
unsigned int flag_nottext : 1; unsigned int flag_nottext : 1;
@ -125,7 +125,7 @@ Index: gdb-7.0/gdb/gdbtypes.h
unsigned int flag_fixed_instance : 1; unsigned int flag_fixed_instance : 1;
unsigned int flag_objfile_owned : 1; unsigned int flag_objfile_owned : 1;
unsigned int flag_discardable : 1; unsigned int flag_discardable : 1;
@@ -1144,6 +1152,10 @@ struct builtin_type @@ -1250,6 +1258,10 @@ struct builtin_type
(*) () can server as a generic function pointer. */ (*) () can server as a generic function pointer. */
struct type *builtin_func_ptr; struct type *builtin_func_ptr;
@ -136,7 +136,7 @@ Index: gdb-7.0/gdb/gdbtypes.h
/* Special-purpose types. */ /* Special-purpose types. */
@@ -1186,6 +1198,7 @@ struct objfile_type @@ -1292,6 +1304,7 @@ struct objfile_type
/* Types used for symbols with no debug information. */ /* Types used for symbols with no debug information. */
struct type *nodebug_text_symbol; struct type *nodebug_text_symbol;
@ -144,10 +144,10 @@ Index: gdb-7.0/gdb/gdbtypes.h
struct type *nodebug_data_symbol; struct type *nodebug_data_symbol;
struct type *nodebug_unknown_symbol; struct type *nodebug_unknown_symbol;
struct type *nodebug_tls_symbol; struct type *nodebug_tls_symbol;
Index: gdb-7.0/gdb/infcall.c Index: gdb-7.0.50.20100115/gdb/infcall.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/infcall.c 2009-11-25 10:24:45.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/infcall.c 2010-01-01 08:31:36.000000000 +0100
+++ gdb-7.0/gdb/infcall.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/infcall.c 2010-01-15 12:16:49.000000000 +0100
@@ -286,6 +286,27 @@ find_function_addr (struct value *functi @@ -286,6 +286,27 @@ find_function_addr (struct value *functi
else else
error (_("Invalid data type for function to be called.")); error (_("Invalid data type for function to be called."));
@ -176,10 +176,10 @@ Index: gdb-7.0/gdb/infcall.c
if (retval_type != NULL) if (retval_type != NULL)
*retval_type = value_type; *retval_type = value_type;
return funaddr + gdbarch_deprecated_function_start_offset (gdbarch); return funaddr + gdbarch_deprecated_function_start_offset (gdbarch);
Index: gdb-7.0/gdb/linespec.c Index: gdb-7.0.50.20100115/gdb/linespec.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/linespec.c 2009-11-25 10:24:45.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/linespec.c 2010-01-12 06:48:56.000000000 +0100
+++ gdb-7.0/gdb/linespec.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/linespec.c 2010-01-15 12:16:49.000000000 +0100
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include "interps.h" #include "interps.h"
#include "mi/mi-cmds.h" #include "mi/mi-cmds.h"
@ -188,7 +188,7 @@ Index: gdb-7.0/gdb/linespec.c
/* We share this one with symtab.c, but it is not exported widely. */ /* We share this one with symtab.c, but it is not exported widely. */
@@ -1875,6 +1876,22 @@ minsym_found (int funfirstline, struct m @@ -1867,6 +1868,22 @@ minsym_found (int funfirstline, struct m
pc = gdbarch_convert_from_func_ptr_addr (gdbarch, pc = gdbarch_convert_from_func_ptr_addr (gdbarch,
values.sals[0].pc, values.sals[0].pc,
&current_target); &current_target);
@ -211,10 +211,10 @@ Index: gdb-7.0/gdb/linespec.c
if (pc != values.sals[0].pc) if (pc != values.sals[0].pc)
values.sals[0] = find_pc_sect_line (pc, NULL, 0); values.sals[0] = find_pc_sect_line (pc, NULL, 0);
Index: gdb-7.0/gdb/minsyms.c Index: gdb-7.0.50.20100115/gdb/minsyms.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/minsyms.c 2009-11-25 10:24:47.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/minsyms.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0/gdb/minsyms.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/minsyms.c 2010-01-15 12:16:49.000000000 +0100
@@ -331,8 +331,9 @@ lookup_minimal_symbol_text (const char * @@ -331,8 +331,9 @@ lookup_minimal_symbol_text (const char *
msymbol = msymbol->hash_next) msymbol = msymbol->hash_next)
{ {
@ -227,7 +227,7 @@ Index: gdb-7.0/gdb/minsyms.c
{ {
switch (MSYMBOL_TYPE (msymbol)) switch (MSYMBOL_TYPE (msymbol))
{ {
@@ -699,6 +700,16 @@ lookup_minimal_symbol_by_pc (CORE_ADDR p @@ -698,6 +699,16 @@ lookup_minimal_symbol_by_pc (CORE_ADDR p
{ {
return lookup_minimal_symbol_by_pc_section (pc, NULL); return lookup_minimal_symbol_by_pc_section (pc, NULL);
} }
@ -244,7 +244,7 @@ Index: gdb-7.0/gdb/minsyms.c
/* Return leading symbol character for a BFD. If BFD is NULL, /* Return leading symbol character for a BFD. If BFD is NULL,
@@ -738,6 +749,7 @@ prim_record_minimal_symbol (const char * @@ -737,6 +748,7 @@ prim_record_minimal_symbol (const char *
switch (ms_type) switch (ms_type)
{ {
case mst_text: case mst_text:
@ -252,7 +252,7 @@ Index: gdb-7.0/gdb/minsyms.c
case mst_file_text: case mst_file_text:
case mst_solib_trampoline: case mst_solib_trampoline:
section = SECT_OFF_TEXT (objfile); section = SECT_OFF_TEXT (objfile);
@@ -1184,7 +1196,8 @@ find_solib_trampoline_target (struct fra @@ -1202,7 +1214,8 @@ find_solib_trampoline_target (struct fra
{ {
ALL_MSYMBOLS (objfile, msymbol) ALL_MSYMBOLS (objfile, msymbol)
{ {
@ -262,11 +262,11 @@ Index: gdb-7.0/gdb/minsyms.c
&& strcmp (SYMBOL_LINKAGE_NAME (msymbol), && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
SYMBOL_LINKAGE_NAME (tsymbol)) == 0) SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
return SYMBOL_VALUE_ADDRESS (msymbol); return SYMBOL_VALUE_ADDRESS (msymbol);
Index: gdb-7.0/gdb/parse.c Index: gdb-7.0.50.20100115/gdb/parse.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/parse.c 2009-11-25 10:24:47.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/parse.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0/gdb/parse.c 2009-11-25 10:26:16.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/parse.c 2010-01-15 12:16:49.000000000 +0100
@@ -517,6 +517,11 @@ write_exp_msymbol (struct minimal_symbol @@ -516,6 +516,11 @@ write_exp_msymbol (struct minimal_symbol
write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol); write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
break; break;
@ -278,25 +278,25 @@ Index: gdb-7.0/gdb/parse.c
case mst_data: case mst_data:
case mst_file_data: case mst_file_data:
case mst_bss: case mst_bss:
Index: gdb-7.0/gdb/solib-svr4.c Index: gdb-7.0.50.20100115/gdb/solib-svr4.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/solib-svr4.c 2009-11-25 10:24:49.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/solib-svr4.c 2010-01-15 12:16:41.000000000 +0100
+++ gdb-7.0/gdb/solib-svr4.c 2009-11-25 10:26:41.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/solib-svr4.c 2010-01-15 12:17:40.000000000 +0100
@@ -1242,7 +1242,8 @@ svr4_in_dynsym_resolve_code (CORE_ADDR p @@ -1257,7 +1257,8 @@ svr4_in_dynsym_resolve_code (CORE_ADDR p
{ && pc < info->interp_text_sect_high)
return ((pc >= interp_text_sect_low && pc < interp_text_sect_high) || (pc >= info->interp_plt_sect_low
|| (pc >= interp_plt_sect_low && pc < interp_plt_sect_high) && pc < info->interp_plt_sect_high)
- || in_plt_section (pc, NULL)); - || in_plt_section (pc, NULL));
+ || in_plt_section (pc, NULL) + || in_plt_section (pc, NULL)
+ || in_gnu_ifunc_stub (pc)); + || in_gnu_ifunc_stub (pc));
} }
/* Given an executable's ABFD and target, compute the entry-point /* Given an executable's ABFD and target, compute the entry-point
Index: gdb-7.0/gdb/symmisc.c Index: gdb-7.0.50.20100115/gdb/symmisc.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/symmisc.c 2009-11-25 10:24:47.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/symmisc.c 2010-01-15 03:22:32.000000000 +0100
+++ gdb-7.0/gdb/symmisc.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/symmisc.c 2010-01-15 12:16:49.000000000 +0100
@@ -287,6 +287,9 @@ dump_msymbols (struct objfile *objfile, @@ -294,6 +294,9 @@ dump_msymbols (struct objfile *objfile,
case mst_text: case mst_text:
ms_type = 'T'; ms_type = 'T';
break; break;
@ -306,11 +306,11 @@ Index: gdb-7.0/gdb/symmisc.c
case mst_solib_trampoline: case mst_solib_trampoline:
ms_type = 'S'; ms_type = 'S';
break; break;
Index: gdb-7.0/gdb/symtab.c Index: gdb-7.0.50.20100115/gdb/symtab.c
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/symtab.c 2009-11-25 10:24:47.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/symtab.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0/gdb/symtab.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/symtab.c 2010-01-15 12:16:49.000000000 +0100
@@ -3155,7 +3155,7 @@ search_symbols (char *regexp, domain_enu @@ -3257,7 +3257,7 @@ search_symbols (char *regexp, domain_enu
{mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown};
static enum minimal_symbol_type types4[] static enum minimal_symbol_type types4[]
= =
@ -319,11 +319,11 @@ Index: gdb-7.0/gdb/symtab.c
enum minimal_symbol_type ourtype; enum minimal_symbol_type ourtype;
enum minimal_symbol_type ourtype2; enum minimal_symbol_type ourtype2;
enum minimal_symbol_type ourtype3; enum minimal_symbol_type ourtype3;
Index: gdb-7.0/gdb/symtab.h Index: gdb-7.0.50.20100115/gdb/symtab.h
=================================================================== ===================================================================
--- gdb-7.0.orig/gdb/symtab.h 2009-11-25 10:24:45.000000000 +0100 --- gdb-7.0.50.20100115.orig/gdb/symtab.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0/gdb/symtab.h 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/symtab.h 2010-01-15 12:16:49.000000000 +0100
@@ -275,6 +275,8 @@ enum minimal_symbol_type @@ -280,6 +280,8 @@ enum minimal_symbol_type
{ {
mst_unknown = 0, /* Unknown type, the default */ mst_unknown = 0, /* Unknown type, the default */
mst_text, /* Generally executable instructions */ mst_text, /* Generally executable instructions */
@ -332,7 +332,7 @@ Index: gdb-7.0/gdb/symtab.h
mst_data, /* Generally initialized data */ mst_data, /* Generally initialized data */
mst_bss, /* Generally uninitialized data */ mst_bss, /* Generally uninitialized data */
mst_abs, /* Generally absolute (nonrelocatable) */ mst_abs, /* Generally absolute (nonrelocatable) */
@@ -1149,6 +1151,8 @@ extern struct minimal_symbol *lookup_min @@ -1163,6 +1165,8 @@ extern struct minimal_symbol *lookup_min
extern struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR); extern struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
@ -341,10 +341,10 @@ Index: gdb-7.0/gdb/symtab.h
extern struct minimal_symbol extern struct minimal_symbol
*lookup_minimal_symbol_by_pc_section (CORE_ADDR, struct obj_section *); *lookup_minimal_symbol_by_pc_section (CORE_ADDR, struct obj_section *);
Index: gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc-lib.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc-lib.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc-lib.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc-lib.c 2010-01-15 12:16:49.000000000 +0100
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -391,10 +391,10 @@ Index: gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc-lib.c
+ +
+ return final; + return final;
+} +}
Index: gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc.c Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc.c 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc.c 2010-01-15 12:16:49.000000000 +0100
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -432,10 +432,10 @@ Index: gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc.c
+ +
+ return 0; /* break-at-exit */ + return 0; /* break-at-exit */
+} +}
Index: gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0/gdb/testsuite/gdb.base/gnu-ifunc.exp 2009-11-25 10:24:56.000000000 +0100 +++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/gnu-ifunc.exp 2010-01-15 12:16:49.000000000 +0100
@@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
+# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009 Free Software Foundation, Inc.
+ +

View File

@ -0,0 +1,17 @@
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -33,6 +33,14 @@ if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
}
+# Workaround ccache making lineno non-zero for command-line definitions.
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
+ set result [catch "exec which gcc" output]
+ if {$result == 0 && [string first "/ccache/" $output] >= -1} {
+ lappend options "compiler=/usr/bin/gcc"
+ }
+}
+
# Generate the intermediate object file. This is required by Darwin to
# have access to the .debug_macinfo section.
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \

View File

@ -1,10 +1,10 @@
gdb/ ###gdb/
2009-12-20 Jan Kratochvil <jan.kratochvil@redhat.com> ###2009-12-20 Jan Kratochvil <jan.kratochvil@redhat.com>
###
Fix compatibility with G++-4.1. ### Fix compatibility with G++-4.1.
* dwarf2read.c (partial_die_parent_scope): New variable PARENT_NAME. ### * dwarf2read.c (partial_die_parent_scope): New variable PARENT_NAME.
Ignore parent namespaces with name "::". ### Ignore parent namespaces with name "::".
(physname_prefix_1): Ignore namespaces with name "::". ### (physname_prefix_1): Ignore namespaces with name "::".
gdb/testsuite/ gdb/testsuite/
2009-12-20 Jan Kratochvil <jan.kratochvil@redhat.com> 2009-12-20 Jan Kratochvil <jan.kratochvil@redhat.com>
@ -12,39 +12,39 @@ gdb/testsuite/
* gdb.dwarf2/dw2-empty-namespace.exp, gdb.dwarf2/dw2-empty-namespace.S: * gdb.dwarf2/dw2-empty-namespace.exp, gdb.dwarf2/dw2-empty-namespace.S:
New. New.
--- a/gdb/dwarf2read.c ###--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c ###+++ b/gdb/dwarf2read.c
@@ -2355,11 +2355,18 @@ partial_die_parent_scope (struct partial_die_info *pdi, ###@@ -2355,11 +2355,18 @@ partial_die_parent_scope (struct partial_die_info *pdi,
|| parent->tag == DW_TAG_interface_type ### || parent->tag == DW_TAG_interface_type
|| parent->tag == DW_TAG_union_type) ### || parent->tag == DW_TAG_union_type)
{ ### {
+ char *parent_name = parent->name; ###+ char *parent_name = parent->name;
+ ###+
+ /* G++ 4.1 produced DW_TAG_namespace with DW_AT_name "::". */ ###+ /* G++ 4.1 produced DW_TAG_namespace with DW_AT_name "::". */
+ if (parent->tag == DW_TAG_namespace && parent_name != NULL ###+ if (parent->tag == DW_TAG_namespace && parent_name != NULL
+ && strcmp (parent_name, "::") == 0) ###+ && strcmp (parent_name, "::") == 0)
+ parent_name = NULL; ###+ parent_name = NULL;
+ ###+
if (grandparent_scope == NULL) ### if (grandparent_scope == NULL)
- parent->scope = parent->name; ###- parent->scope = parent->name;
+ parent->scope = parent_name; ###+ parent->scope = parent_name;
else ### else
parent->scope = typename_concat (&cu->comp_unit_obstack, grandparent_scope, ### parent->scope = typename_concat (&cu->comp_unit_obstack, grandparent_scope,
- parent->name, cu); ###- parent->name, cu);
+ parent_name, cu); ###+ parent_name, cu);
} ### }
else if (parent->tag == DW_TAG_enumeration_type) ### else if (parent->tag == DW_TAG_enumeration_type)
/* Enumerators should not get the name of the enumeration as a prefix. */ ### /* Enumerators should not get the name of the enumeration as a prefix. */
@@ -9008,6 +9015,9 @@ physname_prefix_1 (struct ui_file *buf, struct die_info *die, ###@@ -9008,6 +9015,9 @@ physname_prefix_1 (struct ui_file *buf, struct die_info *die,
name = dwarf2_name (die, cu); ### name = dwarf2_name (die, cu);
if (name == NULL) ### if (name == NULL)
name = "(anonymous namespace)"; ### name = "(anonymous namespace)";
+ /* G++ 4.1 produced DW_TAG_namespace with DW_AT_name "::". */ ###+ /* G++ 4.1 produced DW_TAG_namespace with DW_AT_name "::". */
+ else if (strcmp (name, "::") == 0) ###+ else if (strcmp (name, "::") == 0)
+ name = NULL; ###+ name = NULL;
break; ### break;
###
case DW_TAG_class_type: ### case DW_TAG_class_type:
--- /dev/null --- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.S
@@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@

View File

@ -0,0 +1,501 @@
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -55,20 +55,6 @@ typedef struct saved_bf_symnum SAVED_BF, *SAVED_BF_PTR;
/* Local functions */
extern void _initialize_f_language (void);
-#if 0
-static void clear_function_list (void);
-static long get_bf_for_fcn (long);
-static void clear_bf_list (void);
-static void patch_all_commons_by_name (char *, CORE_ADDR, int);
-static SAVED_F77_COMMON_PTR find_first_common_named (char *);
-static void add_common_entry (struct symbol *);
-static void add_common_block (char *, CORE_ADDR, int, char *);
-static SAVED_FUNCTION *allocate_saved_function_node (void);
-static SAVED_BF_PTR allocate_saved_bf_node (void);
-static COMMON_ENTRY_PTR allocate_common_entry_node (void);
-static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node (void);
-static void patch_common_entries (SAVED_F77_COMMON_PTR, CORE_ADDR, int);
-#endif
static void f_printchar (int c, struct type *type, struct ui_file * stream);
static void f_emit_char (int c, struct type *type,
@@ -419,185 +405,7 @@ _initialize_f_language (void)
add_language (&f_language_defn);
}
-#if 0
-static SAVED_BF_PTR
-allocate_saved_bf_node (void)
-{
- SAVED_BF_PTR new;
-
- new = (SAVED_BF_PTR) xmalloc (sizeof (SAVED_BF));
- return (new);
-}
-
-static SAVED_FUNCTION *
-allocate_saved_function_node (void)
-{
- SAVED_FUNCTION *new;
-
- new = (SAVED_FUNCTION *) xmalloc (sizeof (SAVED_FUNCTION));
- return (new);
-}
-
-static SAVED_F77_COMMON_PTR
-allocate_saved_f77_common_node (void)
-{
- SAVED_F77_COMMON_PTR new;
-
- new = (SAVED_F77_COMMON_PTR) xmalloc (sizeof (SAVED_F77_COMMON));
- return (new);
-}
-
-static COMMON_ENTRY_PTR
-allocate_common_entry_node (void)
-{
- COMMON_ENTRY_PTR new;
-
- new = (COMMON_ENTRY_PTR) xmalloc (sizeof (COMMON_ENTRY));
- return (new);
-}
-#endif
-
SAVED_F77_COMMON_PTR head_common_list = NULL; /* Ptr to 1st saved COMMON */
-SAVED_F77_COMMON_PTR tail_common_list = NULL; /* Ptr to last saved COMMON */
-SAVED_F77_COMMON_PTR current_common = NULL; /* Ptr to current COMMON */
-
-#if 0
-static SAVED_BF_PTR saved_bf_list = NULL; /* Ptr to (.bf,function)
- list */
-static SAVED_BF_PTR saved_bf_list_end = NULL; /* Ptr to above list's end */
-static SAVED_BF_PTR current_head_bf_list = NULL; /* Current head of above list
- */
-
-static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
- in macros */
-
-/* The following function simply enters a given common block onto
- the global common block chain */
-
-static void
-add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
-{
- SAVED_F77_COMMON_PTR tmp;
- char *c, *local_copy_func_stab;
-
- /* If the COMMON block we are trying to add has a blank
- name (i.e. "#BLNK_COM") then we set it to __BLANK
- because the darn "#" character makes GDB's input
- parser have fits. */
-
-
- if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
- || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
- {
-
- xfree (name);
- name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
- strcpy (name, BLANK_COMMON_NAME_LOCAL);
- }
-
- tmp = allocate_saved_f77_common_node ();
-
- local_copy_func_stab = xmalloc (strlen (func_stab) + 1);
- strcpy (local_copy_func_stab, func_stab);
-
- tmp->name = xmalloc (strlen (name) + 1);
-
- /* local_copy_func_stab is a stabstring, let us first extract the
- function name from the stab by NULLing out the ':' character. */
-
-
- c = NULL;
- c = strchr (local_copy_func_stab, ':');
-
- if (c)
- *c = '\0';
- else
- error (_("Malformed function STAB found in add_common_block()"));
-
-
- tmp->owning_function = xmalloc (strlen (local_copy_func_stab) + 1);
-
- strcpy (tmp->owning_function, local_copy_func_stab);
-
- strcpy (tmp->name, name);
- tmp->offset = offset;
- tmp->next = NULL;
- tmp->entries = NULL;
- tmp->secnum = secnum;
-
- current_common = tmp;
-
- if (head_common_list == NULL)
- {
- head_common_list = tail_common_list = tmp;
- }
- else
- {
- tail_common_list->next = tmp;
- tail_common_list = tmp;
- }
-}
-#endif
-
-/* The following function simply enters a given common entry onto
- the "current_common" block that has been saved away. */
-
-#if 0
-static void
-add_common_entry (struct symbol *entry_sym_ptr)
-{
- COMMON_ENTRY_PTR tmp;
-
-
-
- /* The order of this list is important, since
- we expect the entries to appear in decl.
- order when we later issue "info common" calls */
-
- tmp = allocate_common_entry_node ();
-
- tmp->next = NULL;
- tmp->symbol = entry_sym_ptr;
-
- if (current_common == NULL)
- error (_("Attempt to add COMMON entry with no block open!"));
- else
- {
- if (current_common->entries == NULL)
- {
- current_common->entries = tmp;
- current_common->end_of_entries = tmp;
- }
- else
- {
- current_common->end_of_entries->next = tmp;
- current_common->end_of_entries = tmp;
- }
- }
-}
-#endif
-
-/* This routine finds the first encountred COMMON block named "name" */
-
-#if 0
-static SAVED_F77_COMMON_PTR
-find_first_common_named (char *name)
-{
-
- SAVED_F77_COMMON_PTR tmp;
-
- tmp = head_common_list;
-
- while (tmp != NULL)
- {
- if (strcmp (tmp->name, name) == 0)
- return (tmp);
- else
- tmp = tmp->next;
- }
- return (NULL);
-}
-#endif
/* This routine finds the first encountred COMMON block named "name"
that belongs to function funcname */
@@ -620,193 +428,3 @@ find_common_for_function (char *name, char *funcname)
}
return (NULL);
}
-
-
-#if 0
-
-/* The following function is called to patch up the offsets
- for the statics contained in the COMMON block named
- "name." */
-
-static void
-patch_common_entries (SAVED_F77_COMMON_PTR blk, CORE_ADDR offset, int secnum)
-{
- COMMON_ENTRY_PTR entry;
-
- blk->offset = offset; /* Keep this around for future use. */
-
- entry = blk->entries;
-
- while (entry != NULL)
- {
- SYMBOL_VALUE (entry->symbol) += offset;
- SYMBOL_SECTION (entry->symbol) = secnum;
-
- entry = entry->next;
- }
- blk->secnum = secnum;
-}
-
-/* Patch all commons named "name" that need patching.Since COMMON
- blocks occur with relative infrequency, we simply do a linear scan on
- the name. Eventually, the best way to do this will be a
- hashed-lookup. Secnum is the section number for the .bss section
- (which is where common data lives). */
-
-static void
-patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
-{
-
- SAVED_F77_COMMON_PTR tmp;
-
- /* For blank common blocks, change the canonical reprsentation
- of a blank name */
-
- if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
- || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
- {
- xfree (name);
- name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
- strcpy (name, BLANK_COMMON_NAME_LOCAL);
- }
-
- tmp = head_common_list;
-
- while (tmp != NULL)
- {
- if (COMMON_NEEDS_PATCHING (tmp))
- if (strcmp (tmp->name, name) == 0)
- patch_common_entries (tmp, offset, secnum);
-
- tmp = tmp->next;
- }
-}
-#endif
-
-/* This macro adds the symbol-number for the start of the function
- (the symbol number of the .bf) referenced by symnum_fcn to a
- list. This list, in reality should be a FIFO queue but since
- #line pragmas sometimes cause line ranges to get messed up
- we simply create a linear list. This list can then be searched
- first by a queueing algorithm and upon failure fall back to
- a linear scan. */
-
-#if 0
-#define ADD_BF_SYMNUM(bf_sym,fcn_sym) \
- \
- if (saved_bf_list == NULL) \
-{ \
- tmp_bf_ptr = allocate_saved_bf_node(); \
- \
- tmp_bf_ptr->symnum_bf = (bf_sym); \
- tmp_bf_ptr->symnum_fcn = (fcn_sym); \
- tmp_bf_ptr->next = NULL; \
- \
- current_head_bf_list = saved_bf_list = tmp_bf_ptr; \
- saved_bf_list_end = tmp_bf_ptr; \
- } \
-else \
-{ \
- tmp_bf_ptr = allocate_saved_bf_node(); \
- \
- tmp_bf_ptr->symnum_bf = (bf_sym); \
- tmp_bf_ptr->symnum_fcn = (fcn_sym); \
- tmp_bf_ptr->next = NULL; \
- \
- saved_bf_list_end->next = tmp_bf_ptr; \
- saved_bf_list_end = tmp_bf_ptr; \
- }
-#endif
-
-/* This function frees the entire (.bf,function) list */
-
-#if 0
-static void
-clear_bf_list (void)
-{
-
- SAVED_BF_PTR tmp = saved_bf_list;
- SAVED_BF_PTR next = NULL;
-
- while (tmp != NULL)
- {
- next = tmp->next;
- xfree (tmp);
- tmp = next;
- }
- saved_bf_list = NULL;
-}
-#endif
-
-int global_remote_debug;
-
-#if 0
-
-static long
-get_bf_for_fcn (long the_function)
-{
- SAVED_BF_PTR tmp;
- int nprobes = 0;
-
- /* First use a simple queuing algorithm (i.e. look and see if the
- item at the head of the queue is the one you want) */
-
- if (saved_bf_list == NULL)
- internal_error (__FILE__, __LINE__,
- _("cannot get .bf node off empty list"));
-
- if (current_head_bf_list != NULL)
- if (current_head_bf_list->symnum_fcn == the_function)
- {
- if (global_remote_debug)
- fprintf_unfiltered (gdb_stderr, "*");
-
- tmp = current_head_bf_list;
- current_head_bf_list = current_head_bf_list->next;
- return (tmp->symnum_bf);
- }
-
- /* If the above did not work (probably because #line directives were
- used in the sourcefile and they messed up our internal tables) we now do
- the ugly linear scan */
-
- if (global_remote_debug)
- fprintf_unfiltered (gdb_stderr, "\ndefaulting to linear scan\n");
-
- nprobes = 0;
- tmp = saved_bf_list;
- while (tmp != NULL)
- {
- nprobes++;
- if (tmp->symnum_fcn == the_function)
- {
- if (global_remote_debug)
- fprintf_unfiltered (gdb_stderr, "Found in %d probes\n", nprobes);
- current_head_bf_list = tmp->next;
- return (tmp->symnum_bf);
- }
- tmp = tmp->next;
- }
-
- return (-1);
-}
-
-static SAVED_FUNCTION_PTR saved_function_list = NULL;
-static SAVED_FUNCTION_PTR saved_function_list_end = NULL;
-
-static void
-clear_function_list (void)
-{
- SAVED_FUNCTION_PTR tmp = saved_function_list;
- SAVED_FUNCTION_PTR next = NULL;
-
- while (tmp != NULL)
- {
- next = tmp->next;
- xfree (tmp);
- tmp = next;
- }
-
- saved_function_list = NULL;
-}
-#endif
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -71,14 +71,9 @@ typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
-extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */
-extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */
extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
-#define UNINITIALIZED_SECNUM -1
-#define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM)
-
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -35,10 +35,6 @@
#include "command.h"
#include "block.h"
-#if 0
-static int there_is_a_visible_common_named (char *);
-#endif
-
extern void _initialize_f_valprint (void);
static void info_common_command (char *, int);
static void list_all_visible_commons (char *);
@@ -578,67 +574,6 @@ info_common_command (char *comname, int from_tty)
comname, funname);
}
-/* This function is used to determine whether there is a
- F77 common block visible at the current scope called 'comname'. */
-
-#if 0
-static int
-there_is_a_visible_common_named (char *comname)
-{
- SAVED_F77_COMMON_PTR the_common;
- struct frame_info *fi;
- char *funname = 0;
- struct symbol *func;
-
- if (comname == NULL)
- error (_("Cannot deal with NULL common name!"));
-
- fi = get_selected_frame (_("No frame selected"));
-
- /* The following is generally ripped off from stack.c's routine
- print_frame_info() */
-
- func = find_pc_function (fi->pc);
- if (func)
- {
- /* In certain pathological cases, the symtabs give the wrong
- function (when we are in the first function in a file which
- is compiled without debugging symbols, the previous function
- is compiled with debugging symbols, and the "foo.o" symbol
- that is supposed to tell us where the file with debugging symbols
- ends has been truncated by ar because it is longer than 15
- characters).
-
- So look in the minimal symbol tables as well, and if it comes
- up with a larger address for the function use that instead.
- I don't think this can ever cause any problems; there shouldn't
- be any minimal symbols in the middle of a function.
- FIXME: (Not necessarily true. What about text labels) */
-
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
-
- if (msymbol != NULL
- && (SYMBOL_VALUE_ADDRESS (msymbol)
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
- funname = SYMBOL_LINKAGE_NAME (msymbol);
- else
- funname = SYMBOL_LINKAGE_NAME (func);
- }
- else
- {
- struct minimal_symbol *msymbol =
- lookup_minimal_symbol_by_pc (fi->pc);
-
- if (msymbol != NULL)
- funname = SYMBOL_LINKAGE_NAME (msymbol);
- }
-
- the_common = find_common_for_function (comname, funname);
-
- return (the_common ? 1 : 0);
-}
-#endif
-
void
_initialize_f_valprint (void)
{

576
gdb-fortran-common.patch Normal file
View File

@ -0,0 +1,576 @@
Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 21:35:15.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 21:41:32.000000000 +0100
@@ -5811,12 +5811,14 @@ read_set_type (struct die_info *die, str
return set_die_type (die, set_type, cu);
}
-/* First cut: install each common block member as a global variable. */
+/* Create appropriate locally-scoped variables for all the DW_TAG_common_block
+ entries. Create also TYPE_CODE_STRUCT listing all such variables to be
+ available for `info common'. COMMON_BLOCK_DOMAIN is used to sepate the
+ common blocks name namespace from regular variable names. */
static void
read_common_block (struct die_info *die, struct dwarf2_cu *cu)
{
- struct die_info *child_die;
struct attribute *attr;
struct symbol *sym;
CORE_ADDR base = (CORE_ADDR) 0;
@@ -5841,10 +5843,40 @@ read_common_block (struct die_info *die,
}
if (die->child != NULL)
{
+ struct objfile *objfile = cu->objfile;
+ struct die_info *child_die;
+ struct type *type;
+ struct field *field;
+ char *name;
+ struct symbol *sym;
+
+ type = alloc_type (objfile);
+ TYPE_CODE (type) = TYPE_CODE_STRUCT;
+ /* Artificial type to be used only by `info common'. */
+ TYPE_NAME (type) = "<common>";
+
+ child_die = die->child;
+ while (child_die && child_die->tag)
+ {
+ TYPE_NFIELDS (type)++;
+ child_die = sibling_die (child_die);
+ }
+
+ TYPE_FIELDS (type) = obstack_alloc (&objfile->objfile_obstack,
+ sizeof (*TYPE_FIELDS (type))
+ * TYPE_NFIELDS (type));
+ memset (TYPE_FIELDS (type), 0, sizeof (*TYPE_FIELDS (type))
+ * TYPE_NFIELDS (type));
+
+ field = TYPE_FIELDS (type);
child_die = die->child;
while (child_die && child_die->tag)
{
+ /* Create the symbol in the DW_TAG_common_block block in the current
+ symbol scope. */
sym = new_symbol (child_die, NULL, cu);
+
+ /* Undocumented in DWARF3, when it can be present? */
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
if (attr)
{
@@ -5862,8 +5894,25 @@ read_common_block (struct die_info *die,
SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
add_symbol_to_list (sym, &global_symbols);
}
+
+ if (SYMBOL_CLASS (sym) == LOC_STATIC)
+ SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym));
+ else
+ SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
+ FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
+ FIELD_NAME (*field) = SYMBOL_NATURAL_NAME (sym);
+ field++;
child_die = sibling_die (child_die);
}
+
+ /* TYPE_LENGTH (type) is left 0 - it is only a virtual structure even
+ with no consecutive address space. */
+
+ sym = new_symbol (die, type, cu);
+ /* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
+ SYMBOL_VALUE_ADDRESS (sym) = base;
+
+ set_die_type (die, type, cu);
}
}
@@ -9052,6 +9101,13 @@ new_symbol (struct die_info *die, struct
{
var_decode_location (attr, sym, cu);
attr2 = dwarf2_attr (die, DW_AT_external, cu);
+
+ /* Fortran explicitly imports any global symbols to the local
+ scope by DW_TAG_common_block. */
+ if (cu->language == language_fortran && die->parent
+ && die->parent->tag == DW_TAG_common_block)
+ attr2 = NULL;
+
if (attr2 && (DW_UNSND (attr2) != 0))
{
/* Workaround gfortran PR debug/40040 - it uses
@@ -9230,6 +9286,11 @@ new_symbol (struct die_info *die, struct
SYMBOL_DOMAIN (sym) = MODULE_DOMAIN;
add_symbol_to_list (sym, &global_symbols);
break;
+ case DW_TAG_common_block:
+ SYMBOL_CLASS (sym) = LOC_STATIC;
+ SYMBOL_DOMAIN (sym) = COMMON_BLOCK_DOMAIN;
+ add_symbol_to_list (sym, cu->list_in_scope);
+ break;
default:
/* Not a tag we recognize. Hopefully we aren't processing
trash data, but since we must specifically ignore things
Index: gdb-7.0.50.20100115/gdb/f-lang.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/f-lang.c 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/f-lang.c 2010-01-15 21:35:27.000000000 +0100
@@ -448,27 +448,3 @@ _initialize_f_language (void)
add_language (&f_language_defn);
}
-
-SAVED_F77_COMMON_PTR head_common_list = NULL; /* Ptr to 1st saved COMMON */
-
-/* This routine finds the first encountred COMMON block named "name"
- that belongs to function funcname */
-
-SAVED_F77_COMMON_PTR
-find_common_for_function (char *name, char *funcname)
-{
-
- SAVED_F77_COMMON_PTR tmp;
-
- tmp = head_common_list;
-
- while (tmp != NULL)
- {
- if (strcmp (tmp->name, name) == 0
- && strcmp (tmp->owning_function, funcname) == 0)
- return (tmp);
- else
- tmp = tmp->next;
- }
- return (NULL);
-}
Index: gdb-7.0.50.20100115/gdb/f-lang.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/f-lang.h 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/f-lang.h 2010-01-15 21:35:27.000000000 +0100
@@ -51,36 +51,8 @@ enum f90_range_type
NONE_BOUND_DEFAULT /* "(low:high)" */
};
-struct common_entry
- {
- struct symbol *symbol; /* The symbol node corresponding
- to this component */
- struct common_entry *next; /* The next component */
- };
-
-struct saved_f77_common
- {
- char *name; /* Name of COMMON */
- char *owning_function; /* Name of parent function */
- int secnum; /* Section # of .bss */
- CORE_ADDR offset; /* Offset from .bss for
- this block */
- struct common_entry *entries; /* List of block's components */
- struct common_entry *end_of_entries; /* ptr. to end of components */
- struct saved_f77_common *next; /* Next saved COMMON block */
- };
-
-typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR;
-
-typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
-
-extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
-
-extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
-
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
-#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
/* When reasonable array bounds cannot be fetched, such as when
you ask to 'mt print symbols' and there is no stack frame and
Index: gdb-7.0.50.20100115/gdb/f-valprint.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/f-valprint.c 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/f-valprint.c 2010-01-15 21:35:27.000000000 +0100
@@ -34,6 +34,8 @@
#include "gdbcore.h"
#include "command.h"
#include "block.h"
+#include "dictionary.h"
+#include "gdb_assert.h"
extern void _initialize_f_valprint (void);
static void info_common_command (char *, int);
@@ -476,22 +478,54 @@ f_val_print (struct type *type, const gd
return 0;
}
-static void
-list_all_visible_commons (char *funname)
+static int
+info_common_command_for_block (struct block *block, struct frame_info *frame,
+ const char *comname)
{
- SAVED_F77_COMMON_PTR tmp;
-
- tmp = head_common_list;
+ struct dict_iterator iter;
+ struct symbol *sym;
+ int values_printed = 0;
+ const char *name;
+ struct value_print_options opts;
+
+ get_user_print_options (&opts);
+
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
+ if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
+ {
+ struct type *type = SYMBOL_TYPE (sym);
+ int index;
+
+ gdb_assert (SYMBOL_CLASS (sym) == LOC_STATIC);
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT);
+
+ if (comname && (!SYMBOL_LINKAGE_NAME (sym)
+ || strcmp (comname, SYMBOL_LINKAGE_NAME (sym)) != 0))
+ continue;
+
+ values_printed = 1;
+ if (SYMBOL_PRINT_NAME (sym))
+ printf_filtered (_("Contents of F77 COMMON block '%s':\n"),
+ SYMBOL_PRINT_NAME (sym));
+ else
+ printf_filtered (_("Contents of blank COMMON block:\n"));
+
+ for (index = 0; index < TYPE_NFIELDS (type); index++)
+ {
+ struct value *val;
+
+ gdb_assert (field_is_static (&TYPE_FIELD (type, index)));
+ val = value_static_field (type, index);
+
+ printf_filtered ("%s = ", TYPE_FIELD_NAME (type, index));
+ value_print (val, gdb_stdout, &opts);
+ putchar_filtered ('\n');
+ }
- printf_filtered (_("All COMMON blocks visible at this level:\n\n"));
+ putchar_filtered ('\n');
+ }
- while (tmp != NULL)
- {
- if (strcmp (tmp->owning_function, funname) == 0)
- printf_filtered ("%s\n", tmp->name);
-
- tmp = tmp->next;
- }
+ return values_printed;
}
/* This function is used to print out the values in a given COMMON
@@ -501,11 +535,9 @@ list_all_visible_commons (char *funname)
static void
info_common_command (char *comname, int from_tty)
{
- SAVED_F77_COMMON_PTR the_common;
- COMMON_ENTRY_PTR entry;
struct frame_info *fi;
- char *funname = 0;
- struct symbol *func;
+ struct block *block;
+ int values_printed = 0;
/* We have been told to display the contents of F77 COMMON
block supposedly visible in this function. Let us
@@ -517,74 +549,31 @@ info_common_command (char *comname, int
/* The following is generally ripped off from stack.c's routine
print_frame_info() */
- func = find_pc_function (get_frame_pc (fi));
- if (func)
+ block = get_frame_block (fi, 0);
+ if (block == NULL)
{
- /* In certain pathological cases, the symtabs give the wrong
- function (when we are in the first function in a file which
- is compiled without debugging symbols, the previous function
- is compiled with debugging symbols, and the "foo.o" symbol
- that is supposed to tell us where the file with debugging symbols
- ends has been truncated by ar because it is longer than 15
- characters).
-
- So look in the minimal symbol tables as well, and if it comes
- up with a larger address for the function use that instead.
- I don't think this can ever cause any problems; there shouldn't
- be any minimal symbols in the middle of a function.
- FIXME: (Not necessarily true. What about text labels) */
-
- struct minimal_symbol *msymbol =
- lookup_minimal_symbol_by_pc (get_frame_pc (fi));
-
- if (msymbol != NULL
- && (SYMBOL_VALUE_ADDRESS (msymbol)
- > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
- funname = SYMBOL_LINKAGE_NAME (msymbol);
- else
- funname = SYMBOL_LINKAGE_NAME (func);
- }
- else
- {
- struct minimal_symbol *msymbol =
- lookup_minimal_symbol_by_pc (get_frame_pc (fi));
-
- if (msymbol != NULL)
- funname = SYMBOL_LINKAGE_NAME (msymbol);
- else /* Got no 'funname', code below will fail. */
- error (_("No function found for frame."));
+ printf_filtered (_("No symbol table info available.\n"));
+ return;
}
- /* If comname is NULL, we assume the user wishes to see the
- which COMMON blocks are visible here and then return */
-
- if (comname == 0)
+ while (block)
{
- list_all_visible_commons (funname);
- return;
+ if (info_common_command_for_block (block, fi, comname))
+ values_printed = 1;
+ /* After handling the function's top-level block, stop. Don't
+ continue to its superblock, the block of per-file symbols. */
+ if (BLOCK_FUNCTION (block))
+ break;
+ block = BLOCK_SUPERBLOCK (block);
}
- the_common = find_common_for_function (comname, funname);
-
- if (the_common)
+ if (!values_printed)
{
- if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
- printf_filtered (_("Contents of blank COMMON block:\n"));
+ if (comname)
+ printf_filtered (_("No common block '%s'.\n"), comname);
else
- printf_filtered (_("Contents of F77 COMMON block '%s':\n"), comname);
-
- printf_filtered ("\n");
- entry = the_common->entries;
-
- while (entry != NULL)
- {
- print_variable_and_value (NULL, entry->symbol, fi, gdb_stdout, 0);
- entry = entry->next;
- }
+ printf_filtered (_("No common blocks.\n"));
}
- else
- printf_filtered (_("Cannot locate the common block %s in function '%s'\n"),
- comname, funname);
}
void
Index: gdb-7.0.50.20100115/gdb/stack.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/stack.c 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/stack.c 2010-01-15 21:35:27.000000000 +0100
@@ -1474,6 +1474,8 @@ print_block_frame_locals (struct block *
case LOC_COMPUTED:
if (SYMBOL_IS_ARGUMENT (sym))
break;
+ if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
+ break;
values_printed = 1;
print_variable_and_value (NULL, sym, frame, stream, 4 * num_tabs);
break;
Index: gdb-7.0.50.20100115/gdb/symtab.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/symtab.h 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/symtab.h 2010-01-15 21:35:57.000000000 +0100
@@ -401,7 +401,10 @@ typedef enum domain_enum_tag
TYPES_DOMAIN,
/* Fortran module. Their naming must be separate. */
- MODULE_DOMAIN
+ MODULE_DOMAIN,
+
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
+ COMMON_BLOCK_DOMAIN
}
domain_enum;
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/common-block.exp
@@ -0,0 +1,101 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+set testfile "common-block"
+set srcfile ${testfile}.f90
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
+ untested "Couldn't compile ${srcfile}"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto MAIN__] then {
+ perror "couldn't run to breakpoint MAIN__"
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "stop-here-out"]
+gdb_continue_to_breakpoint "stop-here-out"
+
+# Common block naming with source name /foo/:
+# .symtab DW_TAG_common_block's DW_AT_name
+# Intel Fortran foo_ foo_
+# GNU Fortran foo_ foo
+#set suffix "_"
+set suffix ""
+
+set int4 {(integer\(kind=4\)|INTEGER\(4\))}
+set real4 {(real\(kind=4\)|REAL\(4\))}
+set real8 {(real\(kind=8\)|REAL\(8\))}
+
+gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context."
+gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context."
+gdb_test "p foo$suffix" "No symbol \"foo$suffix\" in current context."
+gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
+gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
+gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
+
+gdb_test "info locals" "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" "info locals out"
+gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" "info common out"
+
+gdb_test "ptype ix" "type = $int4" "ptype ix out"
+gdb_test "ptype iy" "type = $real4" "ptype iy out"
+gdb_test "ptype iz" "type = $real8" "ptype iz out"
+gdb_test "ptype ix_x" "type = $int4" "ptype ix_x out"
+gdb_test "ptype iy_y" "type = $real4" "ptype iy_y out"
+gdb_test "ptype iz_z" "type = $real8" "ptype iz_z out"
+
+gdb_test "p ix" " = 1 *" "p ix out"
+gdb_test "p iy" " = 2 *" "p iy out"
+gdb_test "p iz" " = 3 *" "p iz out"
+gdb_test "p ix_x" " = 11 *" "p ix_x out"
+gdb_test "p iy_y" " = 22 *" "p iy_y out"
+gdb_test "p iz_z" " = 33 *" "p iz_z out"
+
+gdb_breakpoint [gdb_get_line_number "stop-here-in"]
+gdb_continue_to_breakpoint "stop-here-in"
+
+gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context." "whatis foo$suffix in"
+gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context." "ptype foo$suffix in"
+gdb_test "p foo$suffix" "No symbol \"foo$suffix\" in current context." "p foo$suffix in"
+gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "whatis fo_o$suffix in"
+gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "ptype fo_o$suffix in"
+gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "p fo_o$suffix in"
+
+gdb_test "info locals" "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55" "info locals in"
+gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix = 11\r\niy2 = 22\r\niz = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3" "info common in"
+
+gdb_test "ptype ix" "type = $int4" "ptype ix in"
+gdb_test "ptype iy2" "type = $real4" "ptype iy2 in"
+gdb_test "ptype iz" "type = $real8" "ptype iz in"
+gdb_test "ptype ix_x" "type = $int4" "ptype ix_x in"
+gdb_test "ptype iy_y" "type = $real4" "ptype iy_y in"
+gdb_test "ptype iz_z2" "type = $real8" "ptype iz_z2 in"
+
+gdb_test "p ix" " = 11 *" "p ix in"
+gdb_test "p iy2" " = 22 *" "p iy2 in"
+gdb_test "p iz" " = 33 *" "p iz in"
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/common-block.f90
@@ -0,0 +1,67 @@
+! Copyright 2008 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+subroutine in
+
+ INTEGER*4 ix
+ REAL*4 iy2
+ REAL*8 iz
+
+ INTEGER*4 ix_x
+ REAL*4 iy_y
+ REAL*8 iz_z2
+
+ common /fo_o/ix,iy2,iz
+ common /foo/ix_x,iy_y,iz_z2
+
+ iy = 5
+ iz_z = 55
+
+ if (ix .ne. 11 .or. iy2 .ne. 22.0 .or. iz .ne. 33.0) call abort
+ if (ix_x .ne. 1 .or. iy_y .ne. 2.0 .or. iz_z2 .ne. 3.0) call abort
+
+ ix = 0 ! stop-here-in
+
+end subroutine in
+
+program common_test
+
+ INTEGER*4 ix
+ REAL*4 iy
+ REAL*8 iz
+
+ INTEGER*4 ix_x
+ REAL*4 iy_y
+ REAL*8 iz_z
+
+ common /foo/ix,iy,iz
+ common /fo_o/ix_x,iy_y,iz_z
+
+ ix = 1
+ iy = 2.0
+ iz = 3.0
+
+ ix_x = 11
+ iy_y = 22.0
+ iz_z = 33.0
+
+ call in ! stop-here-out
+
+end program common_test

153
gdb-fortran-logical8.patch Normal file
View File

@ -0,0 +1,153 @@
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -196,6 +196,7 @@ static int parse_number (char *, int, int, YYSTYPE *);
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
%token INT_KEYWORD INT_S2_KEYWORD LOGICAL_S1_KEYWORD LOGICAL_S2_KEYWORD
+%token LOGICAL_S8_KEYWORD
%token LOGICAL_KEYWORD REAL_KEYWORD REAL_S8_KEYWORD REAL_S16_KEYWORD
%token COMPLEX_S8_KEYWORD COMPLEX_S16_KEYWORD COMPLEX_S32_KEYWORD
%token BOOL_AND BOOL_OR BOOL_NOT
@@ -606,6 +607,8 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
{ $$ = parse_f_type->builtin_integer_s2; }
| CHARACTER
{ $$ = parse_f_type->builtin_character; }
+ | LOGICAL_S8_KEYWORD
+ { $$ = parse_f_type->builtin_logical_s8;}
| LOGICAL_KEYWORD
{ $$ = parse_f_type->builtin_logical; }
| LOGICAL_S2_KEYWORD
@@ -858,6 +861,7 @@ static const struct token f77_keywords[] =
{ "integer_2", INT_S2_KEYWORD, BINOP_END },
{ "logical_1", LOGICAL_S1_KEYWORD, BINOP_END },
{ "logical_2", LOGICAL_S2_KEYWORD, BINOP_END },
+ { "logical_8", LOGICAL_S8_KEYWORD, BINOP_END },
{ "complex_8", COMPLEX_S8_KEYWORD, BINOP_END },
{ "integer", INT_KEYWORD, BINOP_END },
{ "logical", LOGICAL_KEYWORD, BINOP_END },
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -259,6 +245,7 @@ enum f_primitive_types {
f_primitive_type_logical,
f_primitive_type_logical_s1,
f_primitive_type_logical_s2,
+ f_primitive_type_logical_s8,
f_primitive_type_integer,
f_primitive_type_integer_s2,
f_primitive_type_real,
@@ -289,6 +276,8 @@ f_language_arch_info (struct gdbarch *gdbarch,
= builtin->builtin_logical_s1;
lai->primitive_type_vector [f_primitive_type_logical_s2]
= builtin->builtin_logical_s2;
+ lai->primitive_type_vector [f_primitive_type_logical_s8]
+ = builtin->builtin_logical_s8;
lai->primitive_type_vector [f_primitive_type_real]
= builtin->builtin_real;
lai->primitive_type_vector [f_primitive_type_real_s8]
@@ -372,6 +361,10 @@ build_fortran_types (struct gdbarch *gdbarch)
= arch_boolean_type (gdbarch, gdbarch_short_bit (gdbarch), 1,
"logical*2");
+ builtin_f_type->builtin_logical_s8
+ = arch_boolean_type (gdbarch, gdbarch_long_long_bit (gdbarch), 1,
+ "logical*8");
+
builtin_f_type->builtin_integer
= arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0,
"integer");
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -113,6 +80,7 @@ struct builtin_f_type
struct type *builtin_logical;
struct type *builtin_logical_s1;
struct type *builtin_logical_s2;
+ struct type *builtin_logical_s8;
struct type *builtin_real;
struct type *builtin_real_s8;
struct type *builtin_real_s16;
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/logical.exp
@@ -0,0 +1,44 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+set testfile "logical"
+set srcfile ${testfile}.f90
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
+ untested "Couldn't compile ${srcfile}"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto MAIN__] then {
+ perror "couldn't run to breakpoint MAIN__"
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "stop-here"]
+gdb_continue_to_breakpoint "stop-here"
+gdb_test "p l" " = \\.TRUE\\."
+gdb_test "p l1" " = \\.TRUE\\."
+gdb_test "p l2" " = \\.TRUE\\."
+gdb_test "p l4" " = \\.TRUE\\."
+gdb_test "p l8" " = \\.TRUE\\."
diff --git a/gdb/testsuite/gdb.fortran/logical.f90 b/gdb/testsuite/gdb.fortran/logical.f90
new file mode 100644
index 0000000..4229304
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/logical.f90
@@ -0,0 +1,33 @@
+! Copyright 2008 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+program test
+ logical :: l
+ logical (kind=1) :: l1
+ logical (kind=2) :: l2
+ logical (kind=4) :: l4
+ logical (kind=8) :: l8
+ l = .TRUE.
+ l1 = .TRUE.
+ l2 = .TRUE.
+ l4 = .TRUE.
+ l8 = .TRUE.
+ l = .FALSE. ! stop-here
+end

View File

@ -0,0 +1,151 @@
New testcase for:
https://bugzilla.redhat.com/show_bug.cgi?id=466222
(for the first / customer recommended fix)
and the upstream fix:
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
[rfc] Do not make up line information
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
@@ -0,0 +1,21 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+void
+func (void)
+{
+}
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* DW_AT_low_pc-DW_AT_high_pc should cover the function without line number
+ information (.debug_line) so we cannot use an external object file.
+
+ It must not be just a label as it would alias on the next function even for
+ correct GDB. Therefore some stub data must be placed there.
+
+ We need to provide a real stub function body as at least s390
+ (s390_analyze_prologue) would skip the whole body till reaching `main'. */
+
+extern void func (void);
+asm ("func: .incbin \"gdb.base/lineno-makeup-func.bin\"");
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
@@ -0,0 +1,78 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile "lineno-makeup"
+set srcfuncfile ${testfile}-func.c
+set srcfile ${testfile}.c
+set objfuncfile ${objdir}/${subdir}/${testfile}-func.o
+set binfuncfile ${objdir}/${subdir}/${testfile}-func.bin
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output]
+verbose -log "objcopy=$objcopy: $output"
+if { $objcopy != 0 } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+set binfuncfilesize [file size $binfuncfile]
+verbose -log "file size $binfuncfile = $binfuncfilesize"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set b_addr ""
+set test "break func"
+gdb_test_multiple $test $test {
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ pass $test
+ }
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+): .*\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ fail $test
+ }
+}
+verbose -log "b_addr=<$b_addr>"
+
+set p_addr ""
+set test "print func"
+gdb_test_multiple $test $test {
+ -re "\\$\[0-9\]+ = {<text variable, no debug info>} (0x\[0-9a-f\]+) <func>\r\n$gdb_prompt $" {
+ set p_addr $expect_out(1,string)
+ pass $test
+ }
+}
+verbose -log "p_addr=<$p_addr>"
+
+set test "break address belongs to func"
+if {$b_addr == $p_addr} {
+ pass "$test (exact match)"
+} else {
+ set skip [expr $b_addr - $p_addr]
+ if {$skip > 0 && $skip < $binfuncfilesize} {
+ pass "$test (prologue skip by $skip bytes)"
+ } else {
+ fail $test
+ }
+}

View File

@ -41,6 +41,7 @@
#include <assert.h> #include <assert.h>
#include <pty.h> #include <pty.h>
#include <poll.h> #include <poll.h>
#include <sys/stat.h>
#define LENGTH(x) (sizeof (x) / sizeof (*(x))) #define LENGTH(x) (sizeof (x) / sizeof (*(x)))
@ -87,6 +88,8 @@ static int read_out (int amaster)
/* Weird but at least after POLLHUP we get EIO instead of just EOF. */ /* Weird but at least after POLLHUP we get EIO instead of just EOF. */
if (buf_got == -1 && errno == EIO) if (buf_got == -1 && errno == EIO)
return 0; return 0;
if (buf_got == -1 && errno == EAGAIN)
return 0;
if (buf_got < 0) if (buf_got < 0)
{ {
perror ("read (amaster)"); perror ("read (amaster)");

View File

@ -1,21 +0,0 @@
pcc regression from:
http://sourceware.org/ml/gdb-patches/2008-12/msg00143.html
gdb/
2009-12-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (update_watchpoint): Set B->TYPE to bp_watchpoint before
calling hw_watchpoint_used_count.
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1152,6 +1152,9 @@ update_watchpoint (struct breakpoint *b, int reparse)
{
int i, mem_cnt, other_type_used;
+ /* Do not count with B twice below. */
+ b->type = bp_watchpoint;
+
i = hw_watchpoint_used_count (bp_hardware_watchpoint,
&other_type_used);
mem_cnt = can_use_hardware_watchpoint (val_chain);

288
gdb-ppc-power7-test.patch Normal file
View File

@ -0,0 +1,288 @@
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp
@@ -0,0 +1,175 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test PowerPC Power7 instructions disassembly.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC Power7 instructions disassembly."
+ return
+}
+
+set testfile "powerpc-power7"
+set srcfile ${testfile}.s
+set objfile ${objdir}/${subdir}/${testfile}.o
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC Power7 instructions disassembly"
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${objfile}
+
+
+# Disassemble the function.
+
+set test "disass func"
+gdb_test_multiple $test $test {
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+ set func $expect_out(1,string)
+ pass $test
+ }
+}
+
+proc instr_to_patt {offset instr} {
+ # 0x0000000000000018 <func+24>: stxvd2x vs43,r4,r5
+ return ".*\r\n[string map {0x 0x0*} $offset] <func\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
+}
+
+# KFAIL strings would not exist if -Many would print the same as -Mpower7.
+# That means the power7 form should be the preferred one.
+# http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00020
+
+proc func_check {offset instr {kfail ""}} {
+ global func
+
+ set test "Found $offset: $instr"
+ if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
+ pass $test
+ } elseif {$kfail != "" && [regexp -nocase -line [instr_to_patt $offset $kfail] $func]} {
+ kfail gdb/NNNN $test
+ } else {
+ fail $test
+ }
+}
+
+func_check 0x0 "lxvd2x vs3,r4,r5"
+func_check 0x4 "lxvd2ux vs3,r4,r5"
+func_check 0x8 "lxvd2x vs43,r4,r5"
+func_check 0xc "lxvd2ux vs43,r4,r5"
+func_check 0x10 "stxvd2x vs3,r4,r5"
+func_check 0x14 "stxvd2ux vs3,r4,r5"
+func_check 0x18 "stxvd2x vs43,r4,r5"
+func_check 0x1c "stxvd2ux vs43,r4,r5"
+func_check 0x20 "xxmrghd vs3,vs4,vs5"
+func_check 0x24 "xxmrghd vs43,vs44,vs45"
+func_check 0x28 "xxmrgld vs3,vs4,vs5"
+func_check 0x2c "xxmrgld vs43,vs44,vs45"
+func_check 0x30 "xxmrghd vs3,vs4,vs5"
+func_check 0x34 "xxmrghd vs43,vs44,vs45"
+func_check 0x38 "xxmrgld vs3,vs4,vs5"
+func_check 0x3c "xxmrgld vs43,vs44,vs45"
+func_check 0x40 "xxpermdi vs3,vs4,vs5,1"
+func_check 0x44 "xxpermdi vs43,vs44,vs45,1"
+func_check 0x48 "xxpermdi vs3,vs4,vs5,2"
+func_check 0x4c "xxpermdi vs43,vs44,vs45,2"
+func_check 0x50 "xvmovdp vs3,vs4"
+func_check 0x54 "xvmovdp vs43,vs44"
+func_check 0x58 "xvmovdp vs3,vs4"
+func_check 0x5c "xvmovdp vs43,vs44"
+func_check 0x60 "xvcpsgndp vs3,vs4,vs5"
+func_check 0x64 "xvcpsgndp vs43,vs44,vs45"
+func_check 0x68 "wait"
+func_check 0x6c "wait"
+func_check 0x70 "waitrsv"
+func_check 0x74 "waitrsv"
+func_check 0x78 "waitimpl"
+func_check 0x7c "waitimpl"
+func_check 0x80 "doze"
+func_check 0x84 "nap"
+func_check 0x88 "sleep"
+func_check 0x8c "rvwinkle"
+func_check 0x90 "prtyw r3,r4"
+func_check 0x94 "prtyd r13,r14"
+func_check 0x98 "mfcfar r10" "mfspr r10,28"
+func_check 0x9c "mtcfar r11" "mtspr 28,r11"
+func_check 0xa0 "cmpb r3,r4,r5"
+func_check 0xa4 "lwzcix r10,r11,r12"
+func_check 0xa8 "dadd f16,f17,f18"
+func_check 0xac "daddq f20,f22,f24"
+func_check 0xb0 "dss 3"
+func_check 0xb4 "dssall"
+func_check 0xb8 "dst r5,r4,1"
+func_check 0xbc "dstt r8,r7,0"
+func_check 0xc0 "dstst r5,r6,3"
+func_check 0xc4 "dststt r4,r5,2"
+func_check 0xc8 "divwe r10,r11,r12"
+func_check 0xcc "divwe. r11,r12,r13"
+func_check 0xd0 "divweo r12,r13,r14"
+func_check 0xd4 "divweo. r13,r14,r15"
+func_check 0xd8 "divweu r10,r11,r12"
+func_check 0xdc "divweu. r11,r12,r13"
+func_check 0xe0 "divweuo r12,r13,r14"
+func_check 0xe4 "divweuo. r13,r14,r15"
+func_check 0xe8 "bpermd r7,r17,r27"
+func_check 0xec "popcntw r10,r20"
+func_check 0xf0 "popcntd r10,r20"
+func_check 0xf4 "ldbrx r20,r21,r22"
+func_check 0xf8 "stdbrx r20,r21,r22"
+func_check 0xfc "lfiwzx f10,0,r10"
+func_check 0x100 "lfiwzx f10,r9,r10"
+func_check 0x104 "fcfids f4,f5"
+func_check 0x108 "fcfids. f4,f5"
+func_check 0x10c "fcfidus f4,f5"
+func_check 0x110 "fcfidus. f4,f5"
+func_check 0x114 "fctiwu f4,f5"
+func_check 0x118 "fctiwu. f4,f5"
+func_check 0x11c "fctiwuz f4,f5"
+func_check 0x120 "fctiwuz. f4,f5"
+func_check 0x124 "fctidu f4,f5"
+func_check 0x128 "fctidu. f4,f5"
+func_check 0x12c "fctiduz f4,f5"
+func_check 0x130 "fctiduz. f4,f5"
+func_check 0x134 "fcfidu f4,f5"
+func_check 0x138 "fcfidu. f4,f5"
+func_check 0x13c "ftdiv cr0,f10,f11"
+func_check 0x140 "ftdiv cr7,f10,f11"
+func_check 0x144 "ftsqrt cr0,f10"
+func_check 0x148 "ftsqrt cr7,f10"
+func_check 0x14c "dcbtt r8,r9" "dcbt 16,r8,r9"
+func_check 0x150 "dcbtstt r8,r9" "dcbtst 16,r8,r9"
+func_check 0x154 "dcffix f10,f12"
+func_check 0x158 "dcffix. f20,f22"
+func_check 0x15c "lbarx r10,r11,r12"
+func_check 0x160 "lbarx r10,r11,r12"
+func_check 0x164 "lbarx r10,r11,r12,1"
+func_check 0x168 "lharx r20,r21,r22"
+func_check 0x16c "lharx r20,r21,r22"
+func_check 0x170 "lharx r20,r21,r22,1"
+func_check 0x174 "stbcx. r10,r11,r12"
+func_check 0x178 "sthcx. r10,r11,r12"
+func_check 0x17c "fre f14,f15"
+func_check 0x180 "fre. f14,f15"
+func_check 0x184 "fres f14,f15"
+func_check 0x188 "fres. f14,f15"
+func_check 0x18c "frsqrte f14,f15"
+func_check 0x190 "frsqrte. f14,f15"
+func_check 0x194 "frsqrtes f14,f15"
+func_check 0x198 "frsqrtes. f14,f15"
+func_check 0x19c "isel r2,r3,r4,28"
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.s
@@ -0,0 +1,107 @@
+ .text
+ .globl func
+func:
+ .long 0x7c642e98 /* 0: lxvd2x vs3,r4,r5 */
+ .long 0x7c642ed8 /* 4: lxvd2ux vs3,r4,r5 */
+ .long 0x7d642e99 /* 8: lxvd2x vs43,r4,r5 */
+ .long 0x7d642ed9 /* c: lxvd2ux vs43,r4,r5 */
+ .long 0x7c642f98 /* 10: stxvd2x vs3,r4,r5 */
+ .long 0x7c642fd8 /* 14: stxvd2ux vs3,r4,r5 */
+ .long 0x7d642f99 /* 18: stxvd2x vs43,r4,r5 */
+ .long 0x7d642fd9 /* 1c: stxvd2ux vs43,r4,r5 */
+ .long 0xf0642850 /* 20: xxmrghd vs3,vs4,vs5 */
+ .long 0xf16c6857 /* 24: xxmrghd vs43,vs44,vs45 */
+ .long 0xf0642b50 /* 28: xxmrgld vs3,vs4,vs5 */
+ .long 0xf16c6b57 /* 2c: xxmrgld vs43,vs44,vs45 */
+ .long 0xf0642850 /* 30: xxmrghd vs3,vs4,vs5 */
+ .long 0xf16c6857 /* 34: xxmrghd vs43,vs44,vs45 */
+ .long 0xf0642b50 /* 38: xxmrgld vs3,vs4,vs5 */
+ .long 0xf16c6b57 /* 3c: xxmrgld vs43,vs44,vs45 */
+ .long 0xf0642950 /* 40: xxpermdi vs3,vs4,vs5,1 */
+ .long 0xf16c6957 /* 44: xxpermdi vs43,vs44,vs45,1 */
+ .long 0xf0642a50 /* 48: xxpermdi vs3,vs4,vs5,2 */
+ .long 0xf16c6a57 /* 4c: xxpermdi vs43,vs44,vs45,2 */
+ .long 0xf0642780 /* 50: xvmovdp vs3,vs4 */
+ .long 0xf16c6787 /* 54: xvmovdp vs43,vs44 */
+ .long 0xf0642780 /* 58: xvmovdp vs3,vs4 */
+ .long 0xf16c6787 /* 5c: xvmovdp vs43,vs44 */
+ .long 0xf0642f80 /* 60: xvcpsgndp vs3,vs4,vs5 */
+ .long 0xf16c6f87 /* 64: xvcpsgndp vs43,vs44,vs45 */
+ .long 0x7c00007c /* 68: wait */
+ .long 0x7c00007c /* 6c: wait */
+ .long 0x7c20007c /* 70: waitrsv */
+ .long 0x7c20007c /* 74: waitrsv */
+ .long 0x7c40007c /* 78: waitimpl */
+ .long 0x7c40007c /* 7c: waitimpl */
+ .long 0x4c000324 /* 80: doze */
+ .long 0x4c000364 /* 84: nap */
+ .long 0x4c0003a4 /* 88: sleep */
+ .long 0x4c0003e4 /* 8c: rvwinkle */
+ .long 0x7c830134 /* 90: prtyw r3,r4 */
+ .long 0x7dcd0174 /* 94: prtyd r13,r14 */
+ .long 0x7d5c02a6 /* 98: mfcfar r10 */
+ .long 0x7d7c03a6 /* 9c: mtcfar r11 */
+ .long 0x7c832bf8 /* a0: cmpb r3,r4,r5 */
+ .long 0x7d4b662a /* a4: lwzcix r10,r11,r12 */
+ .long 0xee119004 /* a8: dadd f16,f17,f18 */
+ .long 0xfe96c004 /* ac: daddq f20,f22,f24 */
+ .long 0x7c60066c /* b0: dss 3 */
+ .long 0x7e00066c /* b4: dssall */
+ .long 0x7c2522ac /* b8: dst r5,r4,1 */
+ .long 0x7e083aac /* bc: dstt r8,r7,0 */
+ .long 0x7c6532ec /* c0: dstst r5,r6,3 */
+ .long 0x7e442aec /* c4: dststt r4,r5,2 */
+ .long 0x7d4b6356 /* c8: divwe r10,r11,r12 */
+ .long 0x7d6c6b57 /* cc: divwe. r11,r12,r13 */
+ .long 0x7d8d7756 /* d0: divweo r12,r13,r14 */
+ .long 0x7dae7f57 /* d4: divweo. r13,r14,r15 */
+ .long 0x7d4b6316 /* d8: divweu r10,r11,r12 */
+ .long 0x7d6c6b17 /* dc: divweu. r11,r12,r13 */
+ .long 0x7d8d7716 /* e0: divweuo r12,r13,r14 */
+ .long 0x7dae7f17 /* e4: divweuo. r13,r14,r15 */
+ .long 0x7e27d9f8 /* e8: bpermd r7,r17,r27 */
+ .long 0x7e8a02f4 /* ec: popcntw r10,r20 */
+ .long 0x7e8a03f4 /* f0: popcntd r10,r20 */
+ .long 0x7e95b428 /* f4: ldbrx r20,r21,r22 */
+ .long 0x7e95b528 /* f8: stdbrx r20,r21,r22 */
+ .long 0x7d4056ee /* fc: lfiwzx f10,0,r10 */
+ .long 0x7d4956ee /* 100: lfiwzx f10,r9,r10 */
+ .long 0xec802e9c /* 104: fcfids f4,f5 */
+ .long 0xec802e9d /* 108: fcfids. f4,f5 */
+ .long 0xec802f9c /* 10c: fcfidus f4,f5 */
+ .long 0xec802f9d /* 110: fcfidus. f4,f5 */
+ .long 0xfc80291c /* 114: fctiwu f4,f5 */
+ .long 0xfc80291d /* 118: fctiwu. f4,f5 */
+ .long 0xfc80291e /* 11c: fctiwuz f4,f5 */
+ .long 0xfc80291f /* 120: fctiwuz. f4,f5 */
+ .long 0xfc802f5c /* 124: fctidu f4,f5 */
+ .long 0xfc802f5d /* 128: fctidu. f4,f5 */
+ .long 0xfc802f5e /* 12c: fctiduz f4,f5 */
+ .long 0xfc802f5f /* 130: fctiduz. f4,f5 */
+ .long 0xfc802f9c /* 134: fcfidu f4,f5 */
+ .long 0xfc802f9d /* 138: fcfidu. f4,f5 */
+ .long 0xfc0a5900 /* 13c: ftdiv cr0,f10,f11 */
+ .long 0xff8a5900 /* 140: ftdiv cr7,f10,f11 */
+ .long 0xfc005140 /* 144: ftsqrt cr0,f10 */
+ .long 0xff805140 /* 148: ftsqrt cr7,f10 */
+ .long 0x7e084a2c /* 14c: dcbtt r8,r9 */
+ .long 0x7e0849ec /* 150: dcbtstt r8,r9 */
+ .long 0xed406644 /* 154: dcffix f10,f12 */
+ .long 0xee80b645 /* 158: dcffix. f20,f22 */
+ .long 0x7d4b6068 /* 15c: lbarx r10,r11,r12 */
+ .long 0x7d4b6068 /* 160: lbarx r10,r11,r12 */
+ .long 0x7d4b6069 /* 164: lbarx r10,r11,r12,1 */
+ .long 0x7e95b0e8 /* 168: lharx r20,r21,r22 */
+ .long 0x7e95b0e8 /* 16c: lharx r20,r21,r22 */
+ .long 0x7e95b0e9 /* 170: lharx r20,r21,r22,1 */
+ .long 0x7d4b656d /* 174: stbcx. r10,r11,r12 */
+ .long 0x7d4b65ad /* 178: sthcx. r10,r11,r12 */
+ .long 0xfdc07830 /* 17c: fre f14,f15 */
+ .long 0xfdc07831 /* 180: fre. f14,f15 */
+ .long 0xedc07830 /* 184: fres f14,f15 */
+ .long 0xedc07831 /* 188: fres. f14,f15 */
+ .long 0xfdc07834 /* 18c: frsqrte f14,f15 */
+ .long 0xfdc07835 /* 190: frsqrte. f14,f15 */
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */

View File

@ -65,9 +65,11 @@ gdb/testsuite/
(send SIGINT signal to child process): Use gdb_test. (send SIGINT signal to child process): Use gdb_test.
(backtrace through readline handler): New. (backtrace through readline handler): New.
--- a/gdb/config.in Index: gdb-7.0.50.20100115/gdb/config.in
+++ b/gdb/config.in ===================================================================
@@ -351,6 +351,9 @@ --- gdb-7.0.50.20100115.orig/gdb/config.in 2010-01-15 12:48:04.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/config.in 2010-01-15 12:48:40.000000000 +0100
@@ -359,6 +359,9 @@
/* Define if Python interpreter is being linked in. */ /* Define if Python interpreter is being linked in. */
#undef HAVE_PYTHON #undef HAVE_PYTHON
@ -77,9 +79,11 @@ gdb/testsuite/
/* Define to 1 if you have the `realpath' function. */ /* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH #undef HAVE_REALPATH
--- a/gdb/configure.ac Index: gdb-7.0.50.20100115/gdb/configure.ac
+++ b/gdb/configure.ac ===================================================================
@@ -539,17 +539,25 @@ if test "$with_system_readline" = yes; then --- gdb-7.0.50.20100115.orig/gdb/configure.ac 2010-01-15 12:48:04.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/configure.ac 2010-01-15 12:48:40.000000000 +0100
@@ -777,17 +777,25 @@ if test "$with_system_readline" = yes; t
# readline-6.0 started to use the name `_rl_echoing_p'. # readline-6.0 started to use the name `_rl_echoing_p'.
# `$(READLINE_DIR)/' of bundled readline would not resolve in configure. # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
@ -107,8 +111,10 @@ gdb/testsuite/
else else
READLINE='$(READLINE_DIR)/libreadline.a' READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)' READLINE_DEPS='$(READLINE)'
--- a/gdb/event-loop.c Index: gdb-7.0.50.20100115/gdb/event-loop.c
+++ b/gdb/event-loop.c ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/event-loop.c 2010-01-01 08:31:31.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/event-loop.c 2010-01-15 12:48:40.000000000 +0100
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
#include "exceptions.h" #include "exceptions.h"
#include "gdb_assert.h" #include "gdb_assert.h"
@ -144,9 +150,11 @@ gdb/testsuite/
/* Handle any new events occurred while waiting. */ /* Handle any new events occurred while waiting. */
if (process_event ()) if (process_event ())
return 1; return 1;
--- a/gdb/testsuite/gdb.gdb/selftest.exp Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp ===================================================================
@@ -464,31 +464,42 @@ GDB.*Copyright \[0-9\]+ Free Software Foundation, Inc..*$gdb_prompt $"\ --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.gdb/selftest.exp 2010-01-15 12:48:01.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.gdb/selftest.exp 2010-01-15 12:48:40.000000000 +0100
@@ -471,31 +471,42 @@ GDB.*Copyright \[0-9\]+ Free Software Fo
fail "$description (timeout)" fail "$description (timeout)"
} }
} }
@ -202,7 +210,7 @@ gdb/testsuite/
pass "$description" pass "$description"
} }
-re ".*$gdb_prompt $" { -re ".*$gdb_prompt $" {
@@ -500,9 +510,6 @@ GDB.*Copyright \[0-9\]+ Free Software Foundation, Inc..*$gdb_prompt $"\ @@ -507,9 +518,6 @@ GDB.*Copyright \[0-9\]+ Free Software Fo
setup_xfail "alpha*-*-osf*" setup_xfail "alpha*-*-osf*"
fail "$description" fail "$description"
} }
@ -212,75 +220,407 @@ gdb/testsuite/
} }
--- gdb-7.0/gdb/configure 2009-12-07 18:53:30.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/configure
+++ gdb-7.0-x/gdb/configure 2009-12-07 18:53:14.000000000 +0100 ===================================================================
@@ -9201,15 +9201,11 @@ if test "$with_system_readline" = yes; t --- gdb-7.0.50.20100115.orig/gdb/configure 2010-01-15 12:48:04.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/configure 2010-01-15 12:48:46.000000000 +0100
@@ -6772,6 +6772,185 @@ else
fi
+
+
+
+
+# Check whether --with-separate-debug-dir was given.
+if test "${with_separate_debug_dir+set}" = set; then :
+ withval=$with_separate_debug_dir;
+ DEBUGDIR=$withval
+else
+ DEBUGDIR=${libdir}/debug
+fi
+
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo $DEBUGDIR`
+ ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define DEBUGDIR "$ac_define_dir"
+_ACEOF
+
+
+
+ if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ value=0
+ case ${ac_define_dir} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+ value=1
+ ;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define DEBUGDIR_RELOCATABLE $value
+_ACEOF
+
+
+
+# GDB's datadir relocation
+
+
+
+# Check whether --with-gdb-datadir was given.
+if test "${with_gdb_datadir+set}" = set; then :
+ withval=$with_gdb_datadir;
+ GDB_DATADIR=$withval
+else
+ GDB_DATADIR=${datadir}/gdb
+fi
+
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo $GDB_DATADIR`
+ ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_DATADIR "$ac_define_dir"
+_ACEOF
+
+
+
+ if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ value=0
+ case ${ac_define_dir} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+ value=1
+ ;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_DATADIR_RELOCATABLE $value
+_ACEOF
+
+
+
+
+# Check whether --with-relocated-sources was given.
+if test "${with_relocated_sources+set}" = set; then :
+ withval=$with_relocated_sources; reloc_srcdir="${withval}"
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo $reloc_srcdir`
+ ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define RELOC_SRCDIR "$ac_define_dir"
+_ACEOF
+
+
+
+fi
+
+
+# GDB's datadir relocation
+
+gdbdatadir=${datadir}/gdb
+
+
+# Check whether --with-gdb-datadir was given.
+if test "${with_gdb_datadir+set}" = set; then :
+ withval=$with_gdb_datadir; gdbdatadir="${withval}"
+fi
+
+
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_dir=`eval echo $gdbdatadir`
+ ac_define_dir=`eval echo $ac_define_dir`
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_DATADIR "$ac_define_dir"
+_ACEOF
+
+
+
+if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+else
+ test_prefix=$exec_prefix
+fi
+
+case ${gdbdatadir} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+
+$as_echo "#define GDB_DATADIR_RELOCATABLE 1" >>confdefs.h
+
+ ;;
+esac
+GDB_DATADIR_PATH=${gdbdatadir}
+
+
+
+# Check whether --with-pythondir was given.
+if test "${with_pythondir+set}" = set; then :
+ withval=$with_pythondir; pythondir="${withval}"
+else
+ pythondir=no
+fi
+
+
+# If the user passed in a path, define it. Otherwise, compute it at
+# runtime based on the possibly-relocatable datadir.
+if test "$pythondir" = "no"; then
+ pythondir='$(GDB_DATADIR_PATH)/python'
+else
+
+cat >>confdefs.h <<_ACEOF
+#define PYTHONDIR "$pythondir"
+_ACEOF
+
+fi
+
+
# Integration with rpm library to support missing debuginfo suggestions.
# --without-rpm: Disable any rpm support.
# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
@@ -7255,185 +7434,6 @@ fi
-
-# Check whether --with-separate-debug-dir was given.
-if test "${with_separate_debug_dir+set}" = set; then :
- withval=$with_separate_debug_dir;
- DEBUGDIR=$withval
-else
- DEBUGDIR=${libdir}/debug
-fi
-
-
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- ac_define_dir=`eval echo $DEBUGDIR`
- ac_define_dir=`eval echo $ac_define_dir`
-
-cat >>confdefs.h <<_ACEOF
-#define DEBUGDIR "$ac_define_dir"
-_ACEOF
-
-
-
- if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- else
- test_prefix=$exec_prefix
- fi
- value=0
- case ${ac_define_dir} in
- "${test_prefix}"|"${test_prefix}/"*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- value=1
- ;;
- esac
-
-cat >>confdefs.h <<_ACEOF
-#define DEBUGDIR_RELOCATABLE $value
-_ACEOF
-
-
-
-# GDB's datadir relocation
-
-
-
-# Check whether --with-gdb-datadir was given.
-if test "${with_gdb_datadir+set}" = set; then :
- withval=$with_gdb_datadir;
- GDB_DATADIR=$withval
-else
- GDB_DATADIR=${datadir}/gdb
-fi
-
-
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- ac_define_dir=`eval echo $GDB_DATADIR`
- ac_define_dir=`eval echo $ac_define_dir`
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR "$ac_define_dir"
-_ACEOF
-
-
-
- if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- else
- test_prefix=$exec_prefix
- fi
- value=0
- case ${ac_define_dir} in
- "${test_prefix}"|"${test_prefix}/"*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- value=1
- ;;
- esac
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR_RELOCATABLE $value
-_ACEOF
-
-
-
-
-# Check whether --with-relocated-sources was given.
-if test "${with_relocated_sources+set}" = set; then :
- withval=$with_relocated_sources; reloc_srcdir="${withval}"
-
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- ac_define_dir=`eval echo $reloc_srcdir`
- ac_define_dir=`eval echo $ac_define_dir`
-
-cat >>confdefs.h <<_ACEOF
-#define RELOC_SRCDIR "$ac_define_dir"
-_ACEOF
-
-
-
-fi
-
-
-# GDB's datadir relocation
-
-gdbdatadir=${datadir}/gdb
-
-
-# Check whether --with-gdb-datadir was given.
-if test "${with_gdb_datadir+set}" = set; then :
- withval=$with_gdb_datadir; gdbdatadir="${withval}"
-fi
-
-
-
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- ac_define_dir=`eval echo $gdbdatadir`
- ac_define_dir=`eval echo $ac_define_dir`
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR "$ac_define_dir"
-_ACEOF
-
-
-
-if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
-else
- test_prefix=$exec_prefix
-fi
-
-case ${gdbdatadir} in
- "${test_prefix}"|"${test_prefix}/"*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
-
-$as_echo "#define GDB_DATADIR_RELOCATABLE 1" >>confdefs.h
-
- ;;
-esac
-GDB_DATADIR_PATH=${gdbdatadir}
-
-
-
-# Check whether --with-pythondir was given.
-if test "${with_pythondir+set}" = set; then :
- withval=$with_pythondir; pythondir="${withval}"
-else
- pythondir=no
-fi
-
-
-# If the user passed in a path, define it. Otherwise, compute it at
-# runtime based on the possibly-relocatable datadir.
-if test "$pythondir" = "no"; then
- pythondir='$(GDB_DATADIR_PATH)/python'
-else
-
-cat >>confdefs.h <<_ACEOF
-#define PYTHONDIR "$pythondir"
-_ACEOF
-
-fi
-
-
-
-
-
subdirs="$subdirs doc testsuite"
@@ -9290,10 +9290,10 @@ if test "$with_system_readline" = yes; t
# readline-6.0 started to use the name `_rl_echoing_p'. # readline-6.0 started to use the name `_rl_echoing_p'.
# `$(READLINE_DIR)/' of bundled readline would not resolve in configure. # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
- echo "$as_me:$LINENO: checking for readline_echoing_p" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
-echo $ECHO_N "checking for readline_echoing_p... $ECHO_C" >&6 -$as_echo_n "checking for readline_echoing_p... " >&6; }
save_LIBS=$LIBS save_LIBS=$LIBS
LIBS="$LIBS $READLINE" LIBS="$LIBS $READLINE"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
+$as_echo_n "checking for readline_echoing_p... " >&6; } +$as_echo_n "checking for readline_echoing_p... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
int @@ -9316,9 +9316,35 @@ $as_echo "#define readline_echoing_p _rl
@@ -9221,45 +9217,45 @@ extern int readline_echoing_p; fi
return 0; rm -f core conftest.err conftest.$ac_objext \
} conftest$ac_exeext conftest.$ac_ext
_ACEOF - LIBS="$save_LIBS"
-rm -f conftest.$ac_objext conftest$ac_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 $as_echo "$READLINE_ECHOING_P" >&6; }
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
READLINE_ECHOING_P=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ READLINE_ECHOING_P=no
-READLINE_ECHOING_P=no
+$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
+$as_echo "$READLINE_ECHOING_P" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _rl_caught_signal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _rl_caught_signal" >&5
+$as_echo_n "checking for _rl_caught_signal... " >&6; } +$as_echo_n "checking for _rl_caught_signal... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */ +/* end confdefs.h. */
+
-cat >>confdefs.h <<\_ACEOF
-#define readline_echoing_p _rl_echoing_p
+int +int
+main () +main ()
+{ +{
@ -289,24 +629,20 @@ gdb/testsuite/
+ ; + ;
+ return 0; + return 0;
+} +}
_ACEOF +_ACEOF
+if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then :
+ READLINE_CAUGHT_SIGNAL=yes + READLINE_CAUGHT_SIGNAL=yes
+ +
+$as_echo "#define HAVE_READLINE_CAUGHT_SIGNAL /**/" >>confdefs.h +$as_echo "#define HAVE_READLINE_CAUGHT_SIGNAL /**/" >>confdefs.h
+
+else +else
+ READLINE_CAUGHT_SIGNAL=no + READLINE_CAUGHT_SIGNAL=no
fi +fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_CAUGHT_SIGNAL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_CAUGHT_SIGNAL" >&5
+$as_echo "$READLINE_CAUGHT_SIGNAL" >&6; } +$as_echo "$READLINE_CAUGHT_SIGNAL" >&6; }
LIBS="$save_LIBS" + LIBS="$save_LIBS"
- echo "$as_me:$LINENO: result: $READLINE_ECHOING_P" >&5
-echo "${ECHO_T}$READLINE_ECHOING_P" >&6
else else
READLINE='$(READLINE_DIR)/libreadline.a' READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)' READLINE_DEPS='$(READLINE)'

View File

@ -1,123 +0,0 @@
gdb/
2009-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compatibility of --with-system-readline and readline-6.0+.
* configure.ac <--with-system-readline> (for readline_echoing_p): New
test.
* config.in: Regenerate.
* configure: Regenerate.
Index: gdb-6.8.50.20090909/gdb/configure.ac
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure.ac 2009-09-09 20:11:04.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/configure.ac 2009-09-09 20:11:54.000000000 +0200
@@ -773,6 +773,21 @@ if test "$with_system_readline" = yes; t
READLINE=-lreadline
READLINE_DEPS=
READLINE_CFLAGS=
+
+ # readline-6.0 started to use the name `_rl_echoing_p'.
+ # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+
+ AC_MSG_CHECKING([for readline_echoing_p])
+ save_LIBS=$LIBS
+ LIBS="$LIBS $READLINE"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
+ return readline_echoing_p;]]),
+ [READLINE_ECHOING_P=yes],
+ [READLINE_ECHOING_P=no
+ AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
+ [readline-6.0 started to use different name.])])
+ LIBS="$save_LIBS"
+ AC_MSG_RESULT([$READLINE_ECHOING_P])
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'
Index: gdb-6.8.50.20090909/gdb/config.in
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/config.in 2009-09-09 20:11:33.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/config.in 2009-09-09 20:12:00.000000000 +0200
@@ -815,6 +815,9 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
+/* readline-6.0 started to use different name. */
+#undef readline_echoing_p
+
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
Index: gdb-6.8.50.20090909/gdb/configure
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/configure 2009-09-09 20:11:07.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/configure 2009-09-09 20:11:54.000000000 +0200
@@ -9197,6 +9197,69 @@ if test "$with_system_readline" = yes; t
READLINE=-lreadline
READLINE_DEPS=
READLINE_CFLAGS=
+
+ # readline-6.0 started to use the name `_rl_echoing_p'.
+ # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+
+ echo "$as_me:$LINENO: checking for readline_echoing_p" >&5
+echo $ECHO_N "checking for readline_echoing_p... $ECHO_C" >&6
+ save_LIBS=$LIBS
+ LIBS="$LIBS $READLINE"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int readline_echoing_p;
+ return readline_echoing_p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ READLINE_ECHOING_P=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+READLINE_ECHOING_P=no
+
+cat >>confdefs.h <<\_ACEOF
+#define readline_echoing_p _rl_echoing_p
+_ACEOF
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+ echo "$as_me:$LINENO: result: $READLINE_ECHOING_P" >&5
+echo "${ECHO_T}$READLINE_ECHOING_P" >&6
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'

View File

@ -1,9 +1,20 @@
gdb/linux-nat.c: gdb/linux-nat.c:
- Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595). - Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595).
--- gdb-6.8/gdb-orig/symfile.c 2008-08-21 00:06:50.000000000 +0200 Index: gdb-7.0.50.20100115/gdb/elfread.c
+++ gdb-6.8/gdb/symfile.c 2008-08-21 22:31:00.000000000 +0200 ===================================================================
@@ -1456,8 +1456,10 @@ find_separate_debug_file (struct objfile --- gdb-7.0.50.20100115.orig/gdb/elfread.c 2010-01-15 22:19:28.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/elfread.c 2010-01-15 22:19:34.000000000 +0100
@@ -582,7 +582,7 @@ elf_symtab_read (struct objfile *objfile
#define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1
#define BUILD_ID_VERBOSE_BINARY_PARSE 2
-static int build_id_verbose = BUILD_ID_VERBOSE_FILENAMES;
+static int build_id_verbose = BUILD_ID_VERBOSE_NONE;
static void
show_build_id_verbose (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
@@ -1659,8 +1659,10 @@ find_separate_debug_file_by_buildid (str
/* Prevent looping on a stripped .debug file. */ /* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0) if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
{ {
@ -14,9 +25,11 @@ gdb/linux-nat.c:
xfree (build_id_name); xfree (build_id_name);
} }
else if (build_id_name != NULL) else if (build_id_name != NULL)
--- ./gdb/corelow.c 2010-01-01 16:04:34.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/corelow.c
+++ ./gdb/corelow.c 2010-01-01 16:06:26.000000000 +0100 ===================================================================
@@ -277,7 +277,7 @@ add_to_thread_list (bfd *abfd, asection --- gdb-7.0.50.20100115.orig/gdb/corelow.c 2010-01-15 22:19:27.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/corelow.c 2010-01-15 22:19:34.000000000 +0100
@@ -294,7 +294,7 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current */ inferior_ptid = ptid; /* Yes, make it current */
} }
@ -25,21 +38,12 @@ gdb/linux-nat.c:
static void static void
build_id_locate_exec (int from_tty) build_id_locate_exec (int from_tty)
--- ./gdb/symfile.c 2010-01-01 16:04:35.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/linux-nat.c
+++ ./gdb/symfile.c 2010-01-01 16:06:12.000000000 +0100 ===================================================================
@@ -1249,7 +1249,7 @@ symbol_file_clear (int from_tty) --- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 22:19:27.000000000 +0100
#define BUILD_ID_VERBOSE_NONE 0 +++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 22:19:55.000000000 +0100
#define BUILD_ID_VERBOSE_FILENAMES 1 @@ -1768,8 +1768,22 @@ GPT: lwp %s had signal %s, but it is in
#define BUILD_ID_VERBOSE_BINARY_PARSE 2 target_signal_to_string (signo));
-static int build_id_verbose = BUILD_ID_VERBOSE_FILENAMES;
+static int build_id_verbose = BUILD_ID_VERBOSE_NONE;
static void
show_build_id_verbose (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
--- gdb-7.0-orig/gdb/linux-nat.c 2009-12-19 20:53:46.000000000 +0100
+++ gdb-7.0/gdb/linux-nat.c 2009-12-19 20:55:02.000000000 +0100
@@ -1604,8 +1604,22 @@ GPT: lwp %s had signal %s, but it is in
*status = lp->status;
} }
- if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped) - if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)

View File

@ -1,8 +1,10 @@
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
the default gcc and gfortran binaries are from gcc-4.1. the default gcc and gfortran binaries are from gcc-4.1.
--- gdb-7.0/gdb/testsuite/gdb.base/vla.exp-orig 2009-12-20 00:38:13.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/vla.exp
+++ gdb-7.0/gdb/testsuite/gdb.base/vla.exp 2009-12-20 00:54:19.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/vla.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/vla.exp 2010-01-15 22:14:51.000000000 +0100
@@ -16,7 +16,25 @@ @@ -16,7 +16,25 @@
set testfile vla set testfile vla
set srcfile ${testfile}.c set srcfile ${testfile}.c
@ -30,8 +32,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
untested "Couldn't compile test program" untested "Couldn't compile test program"
return -1 return -1
} }
--- gdb-7.0/gdb/testsuite/gdb.base/break-interp.exp-orig 2009-12-20 00:38:13.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/break-interp.exp
+++ gdb-7.0/gdb/testsuite/gdb.base/break-interp.exp 2009-12-20 01:11:47.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/break-interp.exp 2010-01-14 22:12:00.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/break-interp.exp 2010-01-15 22:14:51.000000000 +0100
@@ -31,10 +31,30 @@ if [get_compiler_info ${binfile_lib}] { @@ -31,10 +31,30 @@ if [get_compiler_info ${binfile_lib}] {
return -1 return -1
} }
@ -64,7 +68,7 @@ the default gcc and gfortran binaries are from gcc-4.1.
return -1 return -1
} }
@@ -483,9 +503,33 @@ foreach ldprelink {NO YES} { @@ -480,9 +500,33 @@ foreach ldprelink {NO YES} {
if {$binpie == "YES"} { if {$binpie == "YES"} {
lappend opts {additional_flags=-fPIE -pie} lappend opts {additional_flags=-fPIE -pie}
} }
@ -100,8 +104,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
if {$binsepdebug == "SEP"} { if {$binsepdebug == "SEP"} {
gdb_gnu_strip_debug $exec gdb_gnu_strip_debug $exec
# Just a sanity check. As gdb_gnu_strip_debug uses the # Just a sanity check. As gdb_gnu_strip_debug uses the
--- ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/common-block.exp
+++ ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:21:00.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/common-block.exp 2010-01-15 22:14:17.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/common-block.exp 2010-01-15 22:14:51.000000000 +0100
@@ -20,7 +20,25 @@ set testfile "common-block" @@ -20,7 +20,25 @@ set testfile "common-block"
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile} set binfile ${objdir}/${subdir}/${testfile}
@ -129,8 +135,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
untested "Couldn't compile ${srcfile}" untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/dwarf-stride.exp
+++ ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:20:07.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-01-15 22:14:51.000000000 +0100
@@ -27,7 +27,25 @@ @@ -27,7 +27,25 @@
set testfile dwarf-stride set testfile dwarf-stride
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
@ -158,8 +166,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/dynamic.exp
+++ ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:17:21.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/dynamic.exp 2010-01-15 22:14:51.000000000 +0100
@@ -25,7 +25,25 @@ set testfile "dynamic" @@ -25,7 +25,25 @@ set testfile "dynamic"
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile} set binfile ${objdir}/${subdir}/${testfile}
@ -187,8 +197,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
untested "Couldn't compile ${srcfile}" untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/library-module.exp
+++ ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:22:37.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/library-module.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/library-module.exp 2010-01-15 22:14:51.000000000 +0100
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] { @@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
return -1 return -1
} }
@ -228,8 +240,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
untested "Couldn't compile ${srcfile}" untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/module.exp
+++ ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:28:49.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/module.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/module.exp 2010-01-15 22:14:51.000000000 +0100
@@ -16,7 +16,25 @@ @@ -16,7 +16,25 @@
set testfile "module" set testfile "module"
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
@ -257,8 +271,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:13:56.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/string.exp
+++ ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:18:13.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/string.exp 2010-01-15 22:14:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/string.exp 2010-01-15 22:14:51.000000000 +0100
@@ -23,7 +23,25 @@ set testfile "string" @@ -23,7 +23,25 @@ set testfile "string"
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile} set binfile ${objdir}/${subdir}/${testfile}
@ -286,8 +302,10 @@ the default gcc and gfortran binaries are from gcc-4.1.
untested "Couldn't compile ${srcfile}" untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- gdb-7.0/gdb/testsuite/gdb.fortran/omp-step.exp-orig 2009-12-20 09:47:04.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/omp-step.exp
+++ gdb-7.0/gdb/testsuite/gdb.fortran/omp-step.exp 2009-12-20 09:50:06.000000000 +0100 ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2010-01-15 22:14:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/omp-step.exp 2010-01-15 22:14:51.000000000 +0100
@@ -15,7 +15,26 @@ @@ -15,7 +15,26 @@
set testfile "omp-step" set testfile "omp-step"
@ -316,13 +334,16 @@ the default gcc and gfortran binaries are from gcc-4.1.
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/derived-type.exp 2009-01-07 13:39:13.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/derived-type.exp
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp 2009-12-20 12:37:12.000000000 +0100 ===================================================================
@@ -26,7 +26,25 @@ set testfile "derived-type" --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-01 08:32:02.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-15 22:16:20.000000000 +0100
@@ -28,8 +28,26 @@ set testfile "derived-type"
set srcfile ${testfile}.f90 set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile} set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f77}] != ""} {
+# Temporarily provide f77compiler=gfortran44 saving the original value around. +# Temporarily provide f77compiler=gfortran44 saving the original value around.
+ +
+set board [target_info name] +set board [target_info name]
@ -334,7 +355,8 @@ the default gcc and gfortran binaries are from gcc-4.1.
+} +}
+set_board_info f77compiler gfortran44 +set_board_info f77compiler gfortran44
+ +
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable {debug f77}]
+ +
+unset_board_info f77compiler +unset_board_info f77compiler
+if [info exists old_f77compiler] { +if [info exists old_f77compiler] {
@ -342,16 +364,19 @@ the default gcc and gfortran binaries are from gcc-4.1.
+} +}
+ +
+if { $err != "" } { +if { $err != "" } {
untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- ./gdb/testsuite/gdb.fortran/subarray.exp 2009-01-07 13:39:13.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/subarray.exp 2009-12-20 12:38:00.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/subarray.exp
@@ -26,7 +26,25 @@ set testfile "subarray" ===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-01 08:32:02.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-15 22:17:18.000000000 +0100
@@ -28,8 +28,26 @@ set testfile "subarray"
set srcfile ${testfile}.f set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile} set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f77}] != ""} {
+# Temporarily provide f77compiler=gfortran44 saving the original value around. +# Temporarily provide f77compiler=gfortran44 saving the original value around.
+ +
+set board [target_info name] +set board [target_info name]
@ -363,7 +388,8 @@ the default gcc and gfortran binaries are from gcc-4.1.
+} +}
+set_board_info f77compiler gfortran44 +set_board_info f77compiler gfortran44
+ +
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable {debug f77}]
+ +
+unset_board_info f77compiler +unset_board_info f77compiler
+if [info exists old_f77compiler] { +if [info exists old_f77compiler] {
@ -371,11 +397,13 @@ the default gcc and gfortran binaries are from gcc-4.1.
+} +}
+ +
+if { $err != "" } { +if { $err != "" } {
untested "Couldn't compile ${srcfile}"
return -1 return -1
} }
--- ./gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-12-20 12:22:18.000000000 +0100
+++ ./gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-12-20 12:39:53.000000000 +0100 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/tls-sepdebug.exp
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-01-15 22:14:15.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-01-15 22:14:51.000000000 +0100
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi @@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
# FIXME: gcc dependency (-Wl,-soname). # FIXME: gcc dependency (-Wl,-soname).

View File

@ -1,70 +0,0 @@
http://sourceware.org/ml/gdb-patches/2010-01/msg00142.html
Subject: [patch] Fix crash reading broken stabs
Hi,
seen this stabs from unknown variant of gcc-4.1.2:
1176586 LSYM 0 154 00000000 16682076 basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep:Tt(0,34)=s12!1,020,(0,35)=xs_Rep_base:;_S_max_size:/2(0,36)=k(0,30):_ZNSs4_Rep11_S_max_sizeE;_S_terminal:/2(0,22):_ZNSs4_Rep11_S_terminalE;_S_empty_rep_storage:/2(0,37)=ar(0,38)=r(0,38);0;037777777777;;0;3;(0,30):_ZNSs4_Rep20_S_empty_rep_storageE;_S_empty_rep::(0,39)=f(0,40)=&(0,34):_ZNSs4_Rep12_S_empty_repEv;2A?;_M_is_leaked::(0,41)=#(0,34),(0,42)=@s8;-16;,(0,43)=*(0,44)=k(0,34),(0,1);:_ZNKSs4_Rep12_M_is_leakedEv;2B.;_M_is_shared::(0,41):_ZNKSs4_Rep12_M_is_sharedEv;2B.;_M_set_leaked::(0,45)=#(0,34),(0,1),(0,33),(0,1);:_ZNSs4_Rep13_M_set_leakedEv;2A.;_M_set_sharable::(0,45):_ZNSs4_Rep15_M_set_sharableEv;2A.;_M_set_length_and_sharable::(0,46)=#(0,34),(0,1),(0,33),(0,25),(0,1);:_ZNSs4_Rep26_M_set_length_and_sharableEj;2A.;_M_refdata::(0,47)=#(0,34),(0,3),(0,33),(0,1);:_ZNSs4_Rep10_M_refdataEv;2A.;_M_grab::(0,48)=#(0,34),(0,3),(0,33),(0,5),(0,5),(0,1);:_ZNSs4_Rep7_M_grabERKSaIcES2_;2A.;_S_create::(0,49)=f(0,33):_ZNSs4_Rep9_S_createEjjRKSaIcE;2A?;_M_dispose::(0,50)=#(0,34),(0,1),(0,33),(0,5),(0,1);:_ZNSs4_Rep10_M_disposeERKSaIcE;2A.;_M_destroy::(0,51)=#(0,34),(0,1),(0,33),(0,5),(0,1);:_ZNSs4_Rep10_M_destroyERKSaIcE;2A.;_M_refcopy::(0,47):_ZNSs4_Rep10_M_refcopyEv;2A.;_M_clone::(0,52)=#(0,34),(0,3),(0,33),(0,5),(0,25),(0,1);:_ZNSs4_Rep8_M_cloneERKSaIcEj;2A.;;
There is a GDB crash at:
_M_is_leaked::(0,41)=#(0,34),(0,42)=@s8;-16;,(0,43)=*(0,44)=k(0,34),(0,1);
^^
+ [...] Some broken stabs
+ output contained `(0,41),(0,42)=@s8;-16;,(0,43),(0,1);' where should
+ have been present ";-16,(0,43)" reference instead. This way the
+ excessive ";" marker prematurely stops the parameters parsing. */
Still I was unable to reproduce producing such STABS output.
So this patch does not try to compensate the - presumably - buggy STABS output
and parses such record incorrectly. But it no longer crashes.
No regressions on {x86_64-m32,i686}-fedora12-linux-gnu
using --target_board unix/-gstabs+/-m32.
Thanks,
Jan
gdb/
2010-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* stabsread.c (read_args): Handle zero arguments.
gdb/testsuite/
2010-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.stabs/weird.def (args93): New.
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -4111,7 +4111,17 @@ read_args (char **pp, int end, struct objfile *objfile, int *nargsp,
}
(*pp)++; /* get past `end' (the ':' character) */
- if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
+ if (n == 0)
+ {
+ /* We should read at least the THIS parameter here. Some broken stabs
+ output contained `(0,41),(0,42)=@s8;-16;,(0,43),(0,1);' where should
+ have been present ";-16,(0,43)" reference instead. This way the
+ excessive ";" marker prematurely stops the parameters parsing. */
+
+ complaint (&symfile_complaints, _("Invalid (empty) method arguments"));
+ *varargsp = 0;
+ }
+ else if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
*varargsp = 1;
else
{
--- a/gdb/testsuite/gdb.stabs/weird.def
+++ b/gdb/testsuite/gdb.stabs/weird.def
@@ -880,3 +880,6 @@ var3:
.stabs "sym92:\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0,0,0
.stabs "type92:t92=\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0,0,0
.stabs "attr92:G392=@\ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,0,0, 0
+
+# See read_args "Invalid (empty) method arguments" error.
+.stabs "args93:G93=#(0,93),(0,93)=@s8;-16;,(0,93),(0,93);",N_GSYM,0,0,0

View File

@ -1,69 +0,0 @@
http://sourceware.org/ml/gdb-patches/2009-12/msg00473.html
Subject: [patch] testsuite: false MI "unknown output after running" regression
Hi,
the attached patch will turn the results this way:
-KFAIL: gdb.mi/mi-until.exp: until after while loop (unknown output after running) (PRMS: gdb/2104)
+KFAIL: gdb.mi/mi-until.exp: until after while loop (stopped at wrong place) (PRMS: gdb/2104)
-XFAIL: gdb.mi/mi-watch.exp: sw: watchpoint trigger (unknown output after running)
+XFAIL: gdb.mi/mi-watch.exp: sw: watchpoint trigger (stopped at wrong place)
-KFAIL: gdb.mi/mi2-until.exp: until after while loop (unknown output after running) (PRMS: gdb/2104)
+KFAIL: gdb.mi/mi2-until.exp: until after while loop (stopped at wrong place) (PRMS: gdb/2104)
-XFAIL: gdb.mi/mi2-watch.exp: sw: watchpoint trigger (unknown output after running)
+XFAIL: gdb.mi/mi2-watch.exp: sw: watchpoint trigger (stopped at wrong place)
This is a fix of KFAIL-kind regression due to:
commit 26d086d741fb1bb0eee9d50e0bafa7c5e388023f
Re: [RFA] fix *stopped for CLI commands
http://sourceware.org/ml/gdb-patches/2009-02/msg00278.html
http://sourceware.org/ml/gdb-cvs/2009-02/msg00084.html
part:
gdb/testsuite/
2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
* lib/mi-support.exp (mi_expect_stop): Adjust the order of fields.
(mi_expect_interrupt): Likewise.
* gdb.mi/mi-cli.exp: Check that "step" results in proper *stopped
response.
re-wdiff-ed for your convenience as:
verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}[-thread-id=\"$decimal\",stopped-threads=$any,-]frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped{+,thread-id=\"$decimal\",stopped-threads=$any+}\r\n($thread_selected_re)?$prompt_re"
-re "\\*stopped,${r}${a}${bn}[-thread-id=\"$decimal\",stopped-threads=$any,-]frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped{+,thread-id=\"$decimal\",stopped-threads=$any+}\r\n($thread_selected_re)?$prompt_re" {
-re "\\*stopped,${r}${a}${bn}[-thread-id=\"$decimal\",stopped-threads=$any,-]frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}[-$any-]{+thread-id=\"$decimal\",stopped-threads=$any+}\r\n$prompt_re" {
FYI there is: set any "\[^\n\]*"
"stopped at wrong place" is the right kind of KFAIL/XFAIL (tested
gcc-4.1.2-46.el5_4.1.x86_64 and gcc-4.4.2-20.fc12.x86_64) as discussed
in PR gdb/2104.
In the last case there is missing comma (,) after the former patch above.
$after_stopped was IMO missing there even before. It is in use only by
gdb.mi/mi-simplerun.exp and gdb.mi/mi2-simplerun.exp. Also fixed below.
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
Thanks,
Jan
gdb/testsuite/
2009-12-31 Jan Kratochvil <jan.kratochvil@redhat.com>
* lib/mi-support.exp (mi_expect_stop <stopped at wrong place>): Insert
missing $after_stopped and comma (,) expectation.
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1038,7 +1038,7 @@ proc mi_expect_stop { reason func args file line extra test } {
pass "$test"
return $expect_out(2,string)
}
- -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}thread-id=\"$decimal\",stopped-threads=$any\r\n$prompt_re" {
+ -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n$prompt_re" {
verbose -log "got $expect_out(buffer)"
fail "$test (stopped at wrong place)"
return -1

View File

@ -0,0 +1,221 @@
Re: cvs tracepoint.c build error
http://sourceware.org/ml/gdb/2010-01/msg00150.html
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1647,8 +1647,8 @@ trace_status_command (char *args, int from_tty)
if (ts->buffer_free)
{
- printf_filtered (_("Trace buffer has %d bytes free.\n"),
- ts->buffer_free);
+ printf_filtered (_("Trace buffer has %lld bytes free.\n"),
+ (long long) ts->buffer_free);
}
/* Now report on what we're doing with tfind. */
@@ -2389,7 +2389,7 @@ trace_save_command (char *args, int from_tty)
/* Write a file header, with a high-bit-set char to indicate a
binary file, plus a hint as what this file is, and a version
number in case of future needs. */
- fwrite ("\x7fTRACE0\n", 8, 1, fp);
+ 1 || fwrite ("\x7fTRACE0\n", 8, 1, fp);
/* Write descriptive info. */
@@ -2473,12 +2473,12 @@ trace_save_command (char *args, int from_tty)
/* No more data is forthcoming, we're done. */
if (gotten == 0)
break;
- fwrite (buf, gotten, 1, fp);
+ 1 || fwrite (buf, gotten, 1, fp);
offset += gotten;
}
/* Mark the end of trace data. */
- fwrite (&gotten, 4, 1, fp);
+ 1 || fwrite (&gotten, 4, 1, fp);
do_cleanups (cleanup);
if (from_tty)
@@ -2785,7 +2785,7 @@ tfile_open (char *filename, int from_tty)
int scratch_chan;
char header[TRACE_HEADER_SIZE];
char linebuf[1000]; /* should be max remote packet size or so */
- char byte;
+ char byte = 0;
int bytes, i;
struct trace_status *ts;
struct uploaded_tp *uploaded_tps = NULL;
@@ -2823,7 +2823,7 @@ tfile_open (char *filename, int from_tty)
bytes = 0;
/* Read the file header and test for validity. */
- read (trace_fd, &header, TRACE_HEADER_SIZE);
+ 1 || read (trace_fd, &header, TRACE_HEADER_SIZE);
bytes += TRACE_HEADER_SIZE;
if (!(header[0] == 0x7f
&& (strncmp (header + 1, "TRACE0\n", 7) == 0)))
@@ -2844,7 +2844,7 @@ tfile_open (char *filename, int from_tty)
i = 0;
while (1)
{
- read (trace_fd, &byte, 1);
+ 1 || read (trace_fd, &byte, 1);
++bytes;
if (byte == '\n')
{
@@ -3141,7 +3141,7 @@ static ULONGEST
tfile_get_traceframe_address (off_t tframe_offset)
{
ULONGEST addr = 0;
- short tpnum;
+ short tpnum = 0;
struct breakpoint *tp;
off_t saved_offset = cur_offset;
@@ -3149,7 +3149,7 @@ tfile_get_traceframe_address (off_t tframe_offset)
/* Fall back to using tracepoint address. */
lseek (trace_fd, tframe_offset, SEEK_SET);
- read (trace_fd, &tpnum, 2);
+ 1 || read (trace_fd, &tpnum, 2);
tp = get_tracepoint_by_number_on_target (tpnum);
if (tp && tp->loc)
addr = tp->loc->address;
@@ -3169,7 +3169,7 @@ static int
tfile_trace_find (enum trace_find_type type, int num,
ULONGEST addr1, ULONGEST addr2, int *tpp)
{
- short tpnum;
+ short tpnum = 0;
int tfnum = 0, found = 0;
int data_size;
struct breakpoint *tp;
@@ -3181,11 +3181,11 @@ tfile_trace_find (enum trace_find_type type, int num,
while (1)
{
tframe_offset = offset;
- read (trace_fd, &tpnum, 2);
+ 1 || read (trace_fd, &tpnum, 2);
offset += 2;
if (tpnum == 0)
break;
- read (trace_fd, &data_size, 4);
+ 1 || read (trace_fd, &data_size, 4);
offset += 4;
switch (type)
{
@@ -3245,9 +3245,9 @@ tfile_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- char block_type;
+ char block_type = 0;
int i, pos, offset, regn, regsize;
- unsigned short mlen;
+ unsigned short mlen = 0;
char *regs;
/* An uninitialized reg size says we're not going to be
@@ -3261,12 +3261,12 @@ tfile_fetch_registers (struct target_ops *ops,
pos = 0;
while (pos < cur_data_size)
{
- read (trace_fd, &block_type, 1);
+ 1 || read (trace_fd, &block_type, 1);
++pos;
switch (block_type)
{
case 'R':
- read (trace_fd, regs, trace_regblock_size);
+ 1 || read (trace_fd, regs, trace_regblock_size);
/* Assume the block is laid out in GDB register number order,
each register with the size that it has in GDB. */
offset = 0;
@@ -3293,7 +3293,7 @@ tfile_fetch_registers (struct target_ops *ops,
return;
case 'M':
lseek (trace_fd, 8, SEEK_CUR);
- read (trace_fd, &mlen, 2);
+ 1 || read (trace_fd, &mlen, 2);
lseek (trace_fd, mlen, SEEK_CUR);
pos += (8 + 2 + mlen);
break;
@@ -3314,10 +3314,10 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
- char block_type;
+ char block_type = 0;
int pos;
- ULONGEST maddr;
- unsigned short mlen;
+ ULONGEST maddr = 0;
+ unsigned short mlen = 0;
/* We're only doing regular memory for now. */
if (object != TARGET_OBJECT_MEMORY)
@@ -3330,7 +3330,7 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
pos = 0;
while (pos < cur_data_size)
{
- read (trace_fd, &block_type, 1);
+ 1 || read (trace_fd, &block_type, 1);
++pos;
switch (block_type)
{
@@ -3339,11 +3339,11 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
pos += trace_regblock_size;
break;
case 'M':
- read (trace_fd, &maddr, 8);
- read (trace_fd, &mlen, 2);
+ 1 || read (trace_fd, &maddr, 8);
+ 1 || read (trace_fd, &mlen, 2);
if (maddr <= offset && (offset + len) <= (maddr + mlen))
{
- read (trace_fd, readbuf, mlen);
+ 1 || read (trace_fd, readbuf, mlen);
return mlen;
}
lseek (trace_fd, mlen, SEEK_CUR);
@@ -3369,15 +3369,15 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
static int
tfile_get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
- char block_type;
- int pos, vnum;
- unsigned short mlen;
+ char block_type = 0;
+ int pos, vnum = 0;
+ unsigned short mlen = 0;
lseek (trace_fd, cur_offset, SEEK_SET);
pos = 0;
while (pos < cur_data_size)
{
- read (trace_fd, &block_type, 1);
+ 1 || read (trace_fd, &block_type, 1);
++pos;
switch (block_type)
{
@@ -3387,15 +3387,15 @@ tfile_get_trace_state_variable_value (int tsvnum, LONGEST *val)
break;
case 'M':
lseek (trace_fd, 8, SEEK_CUR);
- read (trace_fd, &mlen, 2);
+ 1 || read (trace_fd, &mlen, 2);
lseek (trace_fd, mlen, SEEK_CUR);
pos += (8 + 2 + mlen);
break;
case 'V':
- read (trace_fd, &vnum, 4);
+ 1 || read (trace_fd, &vnum, 4);
if (tsvnum == vnum)
{
- read (trace_fd, val, 8);
+ 1 || read (trace_fd, val, 8);
return 1;
}
lseek (trace_fd, 8, SEEK_CUR);

View File

@ -32,17 +32,17 @@ Name: gdb%{?_with_debug:-debug}
# Set version to contents of gdb/version.in. # Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3 # NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch). # and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
Version: 7.0.1 Version: 7.0.50.20100116
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 25%{?_with_upstream:.upstream}%{dist} Release: 1%{?_with_upstream:.upstream}%{dist}
License: GPLv3+ License: GPLv3+
Group: Development/Debuggers Group: Development/Debuggers
# ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2 # ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2 # ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2 Source: ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://gnu.org/software/gdb/ URL: http://gnu.org/software/gdb/
@ -118,7 +118,7 @@ Patch118: gdb-6.3-gstack-20050411.patch
# VSYSCALL and PIE # VSYSCALL and PIE
Patch122: gdb-6.3-test-pie-20050107.patch Patch122: gdb-6.3-test-pie-20050107.patch
Patch124: gdb-archer-pie.patch Patch124: gdb-archer-pie-0315-breakpoint_address_match.patch
Patch389: gdb-archer-pie-addons.patch Patch389: gdb-archer-pie-addons.patch
Patch394: gdb-archer-pie-addons-keep-disabled.patch Patch394: gdb-archer-pie-addons-keep-disabled.patch
@ -240,8 +240,8 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
# Testcase for exec() from threaded program (BZ 202689). # Testcase for exec() from threaded program (BZ 202689).
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported post gdb-7.0 fixups. # Backported fixups post the source tarball.
Patch232: gdb-7.0-upstream.patch #Patch232: gdb-upstream.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
@ -376,12 +376,8 @@ Patch349: gdb-archer.patch
# Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187). # Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
# - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE. # - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
Patch352: gdb-6.8-bz457187-largefile.patch
Patch360: gdb-6.8-bz457187-largefile-test.patch Patch360: gdb-6.8-bz457187-largefile-test.patch
# Fix compatibility of --with-system-readline and readline-6.0+.
Patch375: gdb-readline-6.0.patch
# Fix python pretty printers lookup on x86_64. # Fix python pretty printers lookup on x86_64.
Patch376: libstdc++-v3-python-common-prefix.patch Patch376: libstdc++-v3-python-common-prefix.patch
@ -391,17 +387,9 @@ Patch381: gdb-simultaneous-step-resume-breakpoint-test.patch
# Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. # Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
Patch382: gdb-core-open-vdso-warning.patch Patch382: gdb-core-open-vdso-warning.patch
# Support multiple directories for `set debug-file-directory' (BZ 528668).
Patch383: gdb-bz528668-symfile-sepcrc.patch
Patch384: gdb-bz528668-symfile-cleanup.patch
Patch385: gdb-bz528668-symfile-multi.patch
# Support GNU IFUNCs - indirect functions (BZ 539590). # Support GNU IFUNCs - indirect functions (BZ 539590).
Patch387: gdb-bz539590-gnu-ifunc.patch Patch387: gdb-bz539590-gnu-ifunc.patch
# Fix bp conditionals [bp_location-accel] regression (BZ 538626).
Patch388: gdb-bz538626-bp_location-accel-bp-cond.patch
# Fix callback-mode readline-6.0 regression for CTRL-C. # Fix callback-mode readline-6.0 regression for CTRL-C.
Patch390: gdb-readline-6.0-signal.patch Patch390: gdb-readline-6.0-signal.patch
@ -421,23 +409,30 @@ Patch335: gdb-rhel5-compat.patch
# Fix backward compatibility with G++ 4.1 namespaces "::". # Fix backward compatibility with G++ 4.1 namespaces "::".
Patch395: gdb-empty-namespace.patch Patch395: gdb-empty-namespace.patch
# Fix regression on re-setting the single ppc watchpoint slot.
Patch396: gdb-ppc-hw-watchpoint-twice.patch
# Fix regression by python on ia64 due to stale current frame. # Fix regression by python on ia64 due to stale current frame.
Patch397: gdb-follow-child-stale-parent.patch Patch397: gdb-follow-child-stale-parent.patch
# testsuite: Fix false MI "unknown output after running" regression.
Patch398: gdb-testsuite-unknown-output.patch
# Fix regression of gdb-7.0.1 not preserving typedef of a field.
Patch399: gdb-bitfield-check_typedef.patch
# Fix related_breakpoint stale ref crash. # Fix related_breakpoint stale ref crash.
Patch400: gdb-stale-related_breakpoint.patch Patch400: gdb-stale-related_breakpoint.patch
# Fix crash reading broken stabs (it377671). # Workaround ccache making lineno non-zero for command-line definitions.
Patch401: gdb-stabs-read_args.patch Patch403: gdb-ccache-workaround.patch
# Implement `info common' for Fortran.
Patch404: gdb-fortran-common-reduce.patch
Patch405: gdb-fortran-common.patch
# Fix Fortran logical-kind=8 (BZ 465310).
Patch406: gdb-fortran-logical8.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
Patch407: gdb-lineno-makeup-test.patch
# Test power7 ppc disassembly.
Patch408: gdb-ppc-power7-test.patch
# Fix tracepoint.c compilation warnings.
Patch409: gdb-tracepoint-warning.patch
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa} BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
Requires: readline%{?_isa} Requires: readline%{?_isa}
@ -568,12 +563,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%if 0%{!?_with_upstream:1} %if 0%{!?_with_upstream:1}
%patch232 -p1 #patch232 -p1
%patch349 -p1 %patch349 -p1
%patch383 -p1
%patch384 -p1
%patch385 -p1
%patch388 -p1
%patch124 -p1 %patch124 -p1
%patch1 -p1 %patch1 -p1
%patch3 -p1 %patch3 -p1
@ -670,17 +661,26 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch337 -p1 %patch337 -p1
%patch343 -p1 %patch343 -p1
%patch348 -p1 %patch348 -p1
%patch352 -p1
%patch360 -p1 %patch360 -p1
%patch375 -p1
%patch376 -p1 %patch376 -p1
%patch381 -p1 %patch381 -p1
%patch382 -p1 %patch382 -p1
%patch387 -p1 %patch387 -p1
%patch389 -p1
%patch390 -p1 %patch390 -p1
%patch391 -p1 %patch391 -p1
%patch392 -p1 %patch392 -p1
%patch395 -p1
%patch397 -p1
%patch400 -p1
%patch403 -p1
%patch404 -p1
%patch405 -p1
%patch389 -p1
%patch394 -p1
%patch406 -p1
%patch407 -p1
%patch408 -p1
%patch409 -p1
# Always verify its applicability. # Always verify its applicability.
%patch393 -p1 %patch393 -p1
%patch335 -p1 %patch335 -p1
@ -688,14 +688,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch393 -p1 -R %patch393 -p1 -R
%patch335 -p1 -R %patch335 -p1 -R
%endif %endif
%patch394 -p1
%patch395 -p1
%patch396 -p1
%patch397 -p1
%patch398 -p1
%patch399 -p1
%patch400 -p1
%patch401 -p1
find -name "*.orig" | xargs rm -f find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen. ! find -name "*.rej" # Should not happen.
@ -777,7 +769,7 @@ $(: RHEL-5 librpm has incompatible API. ) \
%if 0%{?el5:1} %if 0%{?el5:1}
--without-rpm \ --without-rpm \
%else %else
--with-rpm=librpm.so.0 \ --with-rpm=librpm.so.1 \
%endif %endif
%ifarch ia64 %ifarch ia64
--with-libunwind \ --with-libunwind \
@ -1014,6 +1006,14 @@ fi
%endif %endif
%changelog %changelog
* Sat Jan 16 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.50.20100116-1.fc13
- Upgrade to the FSF GDB snapshot: 7.0.50.20100116
- archer-jankratochvil-fedora13 commit: 81810a20b2d2c3bf18e151de3cddfc96445b3c46
- [expr-cumulative] Archer branch is missing in this release.
- Update rpm.org#76 workaround for rpm-4.8 using librpm.so.1.
- Dissect archer-jankratochvil-misc into Patch403...Patch408.
- Some regressions exist in this release.
* Tue Jan 12 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-25.fc12 * Tue Jan 12 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-25.fc12
- non-librpm missing debuginfo yumcommand now prints also --disablerepo='*' - non-librpm missing debuginfo yumcommand now prints also --disablerepo='*'
to save some bandwidth by yum (Robin Green, BZ 554152). to save some bandwidth by yum (Robin Green, BZ 554152).

View File

@ -1,2 +1,2 @@
53ebade39bfdc1d06744e5188b6438b1 gdb-7.0.1.tar.bz2 446db9ed2489ab9984f67923a51b74a9 gdb-7.0.50.20100116.tar.bz2
7507540c50a1edeb2fc22a37bc4a08b8 libstdc++-v3-python-r151798.tar.bz2 7507540c50a1edeb2fc22a37bc4a08b8 libstdc++-v3-python-r151798.tar.bz2