Accepting request 21093 from devel:gcc

Copy from devel:gcc/gdb based on submit request 21093 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/21093
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=66
This commit is contained in:
OBS User autobuild 2009-09-26 22:03:42 +00:00 committed by Git OBS Bridge
parent 721fd9d81e
commit 66ac274df9
28 changed files with 8331 additions and 6892 deletions

View File

@ -4,20 +4,20 @@
to install and uninstall.
* gstack.sh, gstack.1: New files.
Index: gdb-6.8.50.20090802/gdb/Makefile.in
Index: gdb-6.8.91.20090917/gdb/Makefile.in
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/Makefile.in 2009-08-03 09:50:57.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/Makefile.in 2009-08-03 11:09:49.000000000 +0200
@@ -947,7 +947,7 @@ gdb.z:gdb.1
# time it takes for make to check that all is up to date.
# install-only is intended to address that need.
install: all install-only
-install-only: $(CONFIG_INSTALL)
+install-only: install-gstack $(CONFIG_INSTALL)
--- gdb-6.8.91.20090917.orig/gdb/Makefile.in 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/Makefile.in 2009-09-17 12:47:38.000000000 +0200
@@ -989,7 +989,7 @@ install: all install-only
# The "install-only" target also installs the syscalls' XML files in
# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: install-gstack $(CONFIG_INSTALL) xml-syscall-install
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@@ -979,9 +979,26 @@ install-tui:
@@ -1021,9 +1021,26 @@ install-tui:
$(DESTDIR)$(man1dir) ; \
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@ -45,7 +45,7 @@ Index: gdb-6.8.50.20090802/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1003,6 +1020,17 @@ uninstall-tui:
@@ -1045,6 +1062,17 @@ uninstall-tui:
fi ; \
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@ -63,10 +63,10 @@ Index: gdb-6.8.50.20090802/gdb/Makefile.in
# The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c
Index: gdb-6.8.50.20090802/gdb/gstack.sh
Index: gdb-6.8.91.20090917/gdb/gstack.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/gstack.sh 2009-08-03 11:08:52.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/gstack.sh 2009-09-17 12:47:14.000000000 +0200
@@ -0,0 +1,48 @@
+#!/bin/sh
+

View File

@ -1,163 +0,0 @@
2005-09-27 Jeff Johnston <jjohnstn@redhat.com>
* libunwind-frame.c (libunwind_frame_cache): Save the current
stack pointer in the cache.
(libunwind_sigtramp_frame_this_id): New function.
(libunwind_sigtramp_frame_unwind): New unwinder.
(libunwind_sigtramp_frame_sniffer): Return
libunwind_sigtramp_frame_unwind address.
* libunwind-frame.h (libunwind_sigtramp_frame_this_id): New
prototype.
* ia64-tdep.c (ia64_libunwind_sigtramp_frame_this_id): Calculate
the base address using the current stack pointer plus a fixed
offset.
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
2008-04-16 Yi Zhan <yi.zhan@intel.com>
Fix a compilation error on a typo.
Index: gdb-6.8.50.20090803/gdb/libunwind-frame.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/libunwind-frame.c 2009-01-03 06:57:52.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/libunwind-frame.c 2009-08-04 06:31:34.000000000 +0200
@@ -62,6 +62,7 @@ static unw_word_t (*unw_find_dyn_list_p)
struct libunwind_frame_cache
{
CORE_ADDR base;
+ CORE_ADDR sp;
CORE_ADDR func_addr;
unw_cursor_t cursor;
unw_addr_space_t as;
@@ -134,6 +135,7 @@ libunwind_frame_cache (struct frame_info
unw_accessors_t *acc;
unw_addr_space_t as;
unw_word_t fp;
+ unw_word_t sp;
unw_regnum_t uw_sp_regnum;
struct libunwind_frame_cache *cache;
struct libunwind_descr *descr;
@@ -175,14 +177,30 @@ libunwind_frame_cache (struct frame_info
: __LITTLE_ENDIAN);
unw_init_remote_p (&cache->cursor, as, this_frame);
+
+ /* For the base address, we have a small problem. The majority
+ of the time, we can get the stack pointer of the previous
+ frame to use as a frame pointer. In the case where we have
+ a signal trampoline, the stack may change due to a sigaltstack
+ being set up. In that case, the normal mechanism will give us
+ an address in the regular stack which is not at the end of the
+ sigaltstack as we want. To handle this, we record the stack
+ address so the caller may calculate a more correct base address
+ to use. */
+ uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
+ ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &sp);
+ if (ret < 0)
+ {
+ unw_destroy_addr_space_p (as);
+ error (_("Can't get libunwind sp register."));
+ }
+
if (unw_step_p (&cache->cursor) < 0)
{
unw_destroy_addr_space_p (as);
return NULL;
}
- /* To get base address, get sp from previous frame. */
- uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
if (ret < 0)
{
@@ -190,6 +208,7 @@ libunwind_frame_cache (struct frame_info
error (_("Can't get libunwind sp register."));
}
+ cache->sp = (CORE_ADDR)sp;
cache->base = (CORE_ADDR)fp;
cache->as = as;
@@ -377,6 +396,31 @@ libunwind_search_unwind_table (void *as,
di, pi, need_unwind_info, args);
}
+void
+libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (this_frame, this_cache);
+
+ /* Unlike a regular frame, we can't use the normal frame pointer
+ mechanism because a sigaltstack may have been used. Instead,
+ we return the current stack pointer for the caller to use
+ to calculate the base address. */
+ if (cache != NULL)
+ (*this_id) = frame_id_build (cache->sp, cache->func_addr);
+ else
+ (*this_id) = null_frame_id;
+}
+
+static const struct frame_unwind libunwind_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ libunwind_sigtramp_frame_this_id,
+ libunwind_frame_prev_register
+};
+
/* Verify if we are in a sigtramp frame and we can use libunwind to unwind. */
int
libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
Index: gdb-6.8.50.20090803/gdb/libunwind-frame.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/libunwind-frame.h 2009-01-03 06:57:52.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/libunwind-frame.h 2009-08-04 06:31:34.000000000 +0200
@@ -52,6 +52,9 @@ void libunwind_frame_set_descr (struct g
void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id);
+void libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id);
struct value *libunwind_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum);
void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache);
Index: gdb-6.8.50.20090803/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/ia64-tdep.c 2009-08-04 06:30:45.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/ia64-tdep.c 2009-08-04 06:31:34.000000000 +0200
@@ -3023,7 +3023,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
struct frame_id id;
CORE_ADDR prev_ip;
- libunwind_frame_this_id (this_frame, this_cache, &id);
+ libunwind_sigtramp_frame_this_id (this_frame, this_cache, &id);
if (frame_id_eq (id, null_frame_id))
{
(*this_id) = null_frame_id;
@@ -3035,8 +3035,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
bsp = extract_unsigned_integer (buf, 8, byte_order);
- /* For a sigtramp frame, we don't make the check for previous ip being 0. */
- (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
+ /* For a sigtramp frame, we don't make the check for previous ip being 0.
+ We also must calculate the frame pointer because libunwind will give
+ us back the current stack pointer instead of the frame pointer since
+ it cannot figure this out when in a sigaltstack. We make a basic
+ assumption of 16 (default size) + 8 bytes for sigcontext address.
+ FIXME: if libunwind were to export the frame pointer address, we
+ could eliminate the assumption and get the actual value. */
+ (*this_id) = frame_id_build_special (id.stack_addr + 24, id.code_addr, bsp);
if (gdbarch_debug >= 1)
fprintf_unfiltered (gdb_stdlog,

View File

@ -13,11 +13,11 @@
Port to gdb-6.8.50.20081128, follow the upstream change:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.176&r2=1.177
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
Index: gdb-6.8.50.20090818/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-11-26 06:27:48.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc
--- gdb-6.8.50.20090818.orig/gdb/ia64-tdep.c 2009-07-30 18:29:53.000000000 +0200
+++ gdb-6.8.50.20090818/gdb/ia64-tdep.c 2009-08-24 17:03:11.000000000 +0200
@@ -2153,6 +2153,94 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, pc);
}
@ -29,7 +29,7 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
+ ULONGEST unatN_val;
+ ULONGEST unat;
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
+ register_size (current_gdbarch, IA64_UNAT_REGNUM));
+ register_size (gdbarch, IA64_UNAT_REGNUM));
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
+ }
@ -45,9 +45,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
+ register_size (gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+ register_size (gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get start of register frame. */
@ -71,10 +71,10 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
+ if (nat_addr != 0)
+ read_memory (nat_addr, (char *) &nat_collection,
+ register_size (current_gdbarch, IA64_RNAT_REGNUM));
+ register_size (gdbarch, IA64_RNAT_REGNUM));
+ }
+ else
+ nat_collection = read_memory_integer (nat_addr, 8);
+ nat_collection = read_memory_integer (nat_addr, 8, byte_order);
+ if (nat_addr != 0)
+ {
+ nat_bit = (gr_addr >> 3) & 0x3f;
@ -97,9 +97,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
+ ULONGEST bof;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
+ register_size (gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+ register_size (gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get beginning of frame. */
@ -112,7 +112,7 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM)
|| (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
{
@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc
@@ -2167,7 +2255,42 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, 0);
}
@ -133,9 +133,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
+ ULONGEST cfm;
+ ULONGEST prN_val;
+ read_memory (pr_addr, (char *) &pr,
+ register_size (current_gdbarch, IA64_PR_REGNUM));
+ register_size (gdbarch, IA64_PR_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+ register_size (gdbarch, IA64_CFM_REGNUM));
+
+ /* Get the register rename base for this frame and adjust the
+ * register name to take rotation into account. */

View File

@ -5,8 +5,10 @@
* gdb.cp/b146835b.cc: Ditto.
* gdb.cp/b146835.h: Ditto.
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc.fix3 2005-07-26 16:47:12.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc 2005-07-26 16:53:31.000000000 -0400
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc 2009-08-12 06:07:50.000000000 +0200
@@ -0,0 +1,11 @@
+#include "b146835.h"
+
@ -19,8 +21,10 @@
+void A::funcD (class E *e, class D *d) {}
+void A::funcE (E *e, D *d) {}
+void A::funcF (unsigned long x, D *d) {}
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc.fix3 2005-07-26 16:47:20.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc 2005-07-26 16:46:50.000000000 -0400
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc 2009-08-12 06:07:50.000000000 +0200
@@ -0,0 +1,32 @@
+#include "b146835.h"
+#include <iostream>
@ -54,9 +58,11 @@
+ f.foo();
+}
+
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp.fix3 2005-07-26 16:47:26.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp 2005-07-26 16:46:50.000000000 -0400
@@ -0,0 +1,55 @@
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp 2009-08-12 06:58:28.000000000 +0200
@@ -0,0 +1,54 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 Free Software Foundation, Inc.
@ -110,10 +116,11 @@
+gdb_continue_to_breakpoint "First line foo"
+
+# Verify that we can access the inherited member d
+gdb_test "p d" ".*(struct D \*.).*0x0" "Verify inherited member d accessible"
+
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.h.fix3 2005-07-26 16:47:36.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.h 2005-07-26 16:53:18.000000000 -0400
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h 2009-08-12 06:07:50.000000000 +0200
@@ -0,0 +1,36 @@
+
+class A {

View File

@ -25,10 +25,10 @@
Port to GDB-6.7.
Index: gdb-6.8.50.20090803/gdb/symfile-mem.c
Index: gdb-6.8.50.20090909/gdb/symfile-mem.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/symfile-mem.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/symfile-mem.c 2009-08-03 16:03:17.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/symfile-mem.c 2009-07-02 19:21:06.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile-mem.c 2009-09-09 19:06:57.000000000 +0200
@@ -56,6 +56,14 @@
#include "elf/common.h"
@ -53,10 +53,10 @@ Index: gdb-6.8.50.20090803/gdb/symfile-mem.c
if (nbfd == NULL)
error (_("Failed to read a valid object file image from memory."));
Index: gdb-6.8.50.20090803/gdb/target.c
Index: gdb-6.8.50.20090909/gdb/target.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/target.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/target.c 2009-08-03 16:03:17.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/target.c 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/target.c 2009-09-09 19:08:11.000000000 +0200
@@ -59,7 +59,7 @@ static int nosymbol (char *, CORE_ADDR *
static void tcomplain (void) ATTR_NORETURN;
@ -66,7 +66,7 @@ Index: gdb-6.8.50.20090803/gdb/target.c
static int return_zero (void);
@@ -452,7 +452,7 @@ target_terminal_inferior (void)
@@ -492,7 +492,7 @@ target_terminal_inferior (void)
(*current_target.to_terminal_inferior) ();
}
@ -75,7 +75,7 @@ Index: gdb-6.8.50.20090803/gdb/target.c
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t)
{
@@ -670,7 +670,7 @@ update_current_target (void)
@@ -711,7 +711,7 @@ update_current_target (void)
(void (*) (struct regcache *))
noprocess);
de_fault (deprecated_xfer_memory,
@ -84,7 +84,7 @@ Index: gdb-6.8.50.20090803/gdb/target.c
nomemory);
de_fault (to_files_info,
(void (*) (struct target_ops *))
@@ -1381,7 +1381,7 @@ target_xfer_partial (struct target_ops *
@@ -1443,7 +1443,7 @@ target_xfer_partial (struct target_ops *
it makes no progress, and then return how much was transferred). */
int
@ -93,7 +93,16 @@ Index: gdb-6.8.50.20090803/gdb/target.c
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -1394,7 +1394,7 @@ target_read_memory (CORE_ADDR memaddr, g
@@ -1459,7 +1459,7 @@ target_read_memory (CORE_ADDR memaddr, g
the target's stack. This may trigger different cache behavior. */
int
-target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -1473,7 +1473,7 @@ target_read_stack (CORE_ADDR memaddr, gd
}
int
@ -102,7 +111,7 @@ Index: gdb-6.8.50.20090803/gdb/target.c
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -2861,8 +2861,8 @@ debug_to_prepare_to_store (struct regcac
@@ -2964,8 +2964,8 @@ debug_to_prepare_to_store (struct regcac
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
}
@ -113,7 +122,7 @@ Index: gdb-6.8.50.20090803/gdb/target.c
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
@@ -2872,8 +2872,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
@@ -2975,8 +2975,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
attrib, target);
fprintf_unfiltered (gdb_stdlog,
@ -124,11 +133,11 @@ Index: gdb-6.8.50.20090803/gdb/target.c
write ? "write" : "read", retval);
if (retval > 0)
Index: gdb-6.8.50.20090803/gdb/target.h
Index: gdb-6.8.50.20090909/gdb/target.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/target.h 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/target.h 2009-08-03 16:03:17.000000000 +0200
@@ -363,10 +363,10 @@ struct target_ops
--- gdb-6.8.50.20090909.orig/gdb/target.h 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/target.h 2009-09-09 19:07:36.000000000 +0200
@@ -366,10 +366,10 @@ struct target_ops
NOTE: cagney/2004-10-01: This has been entirely superseeded by
to_xfer_partial and inferior inheritance. */
@ -143,53 +152,58 @@ Index: gdb-6.8.50.20090803/gdb/target.h
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
@@ -675,10 +675,10 @@ extern DCACHE *target_dcache;
@@ -680,12 +680,12 @@ extern void target_dcache_invalidate (vo
extern int target_read_string (CORE_ADDR, char **, int, int *);
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
-extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
- int len);
+ LONGEST len);
/* Fetches the target's memory map. If one is found it is sorted
and returned, after some consistency checking. Otherwise, NULL
Index: gdb-6.8.50.20090803/gdb/dcache.c
Index: gdb-6.8.50.20090909/gdb/dcache.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/dcache.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/dcache.c 2009-08-03 16:03:17.000000000 +0200
@@ -524,9 +524,9 @@ dcache_free (DCACHE *dcache)
--- gdb-6.8.50.20090909.orig/gdb/dcache.c 2009-08-31 22:18:45.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dcache.c 2009-09-09 19:09:21.000000000 +0200
@@ -390,10 +390,10 @@ dcache_free (DCACHE *dcache)
This routine is indended to be called by remote_xfer_ functions. */
The meaning of the result is the same as for target_write. */
-int
+LONGEST
dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache,
CORE_ADDR memaddr, gdb_byte *myaddr,
- int len, int should_write)
+ LONGEST len, int should_write)
{
int i;
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
Index: gdb-6.8.50.20090803/gdb/dcache.h
int res;
Index: gdb-6.8.50.20090909/gdb/dcache.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/dcache.h 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/dcache.h 2009-08-03 16:03:17.000000000 +0200
@@ -35,7 +35,7 @@ void dcache_free (DCACHE *);
--- gdb-6.8.50.20090909.orig/gdb/dcache.h 2009-08-31 22:18:45.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dcache.h 2009-09-09 19:08:54.000000000 +0200
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
/* Simple to call from <remote>_xfer_memory */
-int dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
- int len, int should_write);
+LONGEST dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
+ LONGEST len, int should_write);
-int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
- gdb_byte *my, int len, int should_write);
+LONGEST dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
+ gdb_byte *my, LONGEST len, int should_write);
#endif /* DCACHE_H */
Index: gdb-6.8.50.20090803/gdb/exec.c
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
int len);
Index: gdb-6.8.50.20090909/gdb/exec.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/exec.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/exec.c 2009-08-03 16:03:17.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/exec.c 2009-07-02 19:21:06.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/exec.c 2009-09-09 19:06:57.000000000 +0200
@@ -560,7 +560,7 @@ map_vmap (bfd *abfd, bfd *arch)
}
@ -199,11 +213,11 @@ Index: gdb-6.8.50.20090803/gdb/exec.c
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len,
struct target_section *sections,
Index: gdb-6.8.50.20090803/gdb/linux-nat.c
Index: gdb-6.8.50.20090909/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-03 16:03:17.000000000 +0200
@@ -4516,7 +4516,7 @@ linux_xfer_partial (struct target_ops *o
--- gdb-6.8.50.20090909.orig/gdb/linux-nat.c 2009-09-09 19:06:46.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/linux-nat.c 2009-09-09 19:06:57.000000000 +0200
@@ -4622,7 +4622,7 @@ linux_xfer_partial (struct target_ops *o
#endif
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
{ /* This region contains ia64 rse registers, we have to re-read. */
@ -212,10 +226,10 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
/* Re-read register stack area. */
xxfer = super_xfer_partial (ops, object, annex,
Index: gdb-6.8.50.20090803/gdb/remote.c
Index: gdb-6.8.50.20090909/gdb/remote.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/remote.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/remote.c 2009-08-03 16:03:17.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/remote.c 2009-08-18 18:17:16.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/remote.c 2009-09-09 19:06:57.000000000 +0200
@@ -25,6 +25,7 @@
#include "gdb_string.h"
#include <ctype.h>
@ -224,7 +238,7 @@ Index: gdb-6.8.50.20090803/gdb/remote.c
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
@@ -5785,12 +5786,19 @@ handle_notification (char *buf, size_t l
@@ -5764,12 +5765,19 @@ handle_notification (char *buf, size_t l
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
@ -246,7 +260,7 @@ Index: gdb-6.8.50.20090803/gdb/remote.c
set_general_thread (inferior_ptid);
@@ -5799,7 +5807,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
@@ -5778,7 +5786,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
else
res = remote_read_bytes (mem_addr, buffer, mem_len);
@ -255,10 +269,10 @@ Index: gdb-6.8.50.20090803/gdb/remote.c
}
/* Sends a packet with content determined by the printf format string
Index: gdb-6.8.50.20090803/gdb/remote-sim.c
Index: gdb-6.8.50.20090909/gdb/remote-sim.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/remote-sim.c 2009-08-03 16:03:00.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/remote-sim.c 2009-08-03 16:03:17.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/remote-sim.c 2009-07-02 19:21:06.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/remote-sim.c 2009-09-09 19:06:57.000000000 +0200
@@ -752,11 +752,14 @@ gdbsim_prepare_to_store (struct regcache
Returns the number of bytes transferred. */
@ -276,10 +290,10 @@ Index: gdb-6.8.50.20090803/gdb/remote-sim.c
/* If no program is running yet, then ignore the simulator for
memory. Pass the request down to the next target, hopefully
an exec file. */
Index: gdb-6.8.50.20090803/gdb/exec.h
Index: gdb-6.8.50.20090909/gdb/exec.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/exec.h 2009-06-12 20:38:36.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/exec.h 2009-08-03 16:03:57.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/exec.h 2009-06-12 20:38:36.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/exec.h 2009-09-09 19:06:57.000000000 +0200
@@ -56,7 +56,7 @@ extern int resize_section_table (struct
One, and only one, of readbuf or writebuf must be non-NULL. */

View File

@ -26,10 +26,10 @@
Fix scan_dyntag() for binaries provided by valgrind (BZ 460319).
Index: gdb-6.8.50.20090809/gdb/amd64-tdep.c
Index: gdb-6.8.91.20090917/gdb/amd64-tdep.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/amd64-tdep.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/amd64-tdep.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/amd64-tdep.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/amd64-tdep.c 2009-09-17 12:50:07.000000000 +0200
@@ -36,6 +36,7 @@
#include "regcache.h"
#include "regset.h"
@ -138,10 +138,10 @@ Index: gdb-6.8.50.20090809/gdb/amd64-tdep.c
return pc;
}
Index: gdb-6.8.50.20090809/gdb/auxv.c
Index: gdb-6.8.91.20090917/gdb/auxv.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/auxv.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/auxv.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/auxv.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/auxv.c 2009-09-17 12:50:07.000000000 +0200
@@ -78,7 +78,7 @@ procfs_xfer_auxv (struct target_ops *ops
Return 1 if an entry was read into *TYPEP and *VALP. */
static int
@ -230,10 +230,10 @@ Index: gdb-6.8.50.20090809/gdb/auxv.c
break;
}
Index: gdb-6.8.50.20090809/gdb/auxv.h
Index: gdb-6.8.91.20090917/gdb/auxv.h
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/auxv.h 2009-06-07 21:07:08.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/auxv.h 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/auxv.h 2009-06-07 21:07:08.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/auxv.h 2009-09-17 12:50:07.000000000 +0200
@@ -31,14 +31,14 @@
Return 1 if an entry was read into *TYPEP and *VALP. */
extern int target_auxv_parse (struct target_ops *ops,
@ -251,11 +251,11 @@ Index: gdb-6.8.50.20090809/gdb/auxv.h
/* Print the contents of the target's AUXV on the specified file. */
extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
Index: gdb-6.8.50.20090809/gdb/dwarf2read.c
Index: gdb-6.8.91.20090917/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/dwarf2read.c 2009-08-10 14:59:28.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/dwarf2read.c 2009-08-10 14:59:58.000000000 +0200
@@ -1659,7 +1659,7 @@ dwarf2_build_psymtabs (struct objfile *o
--- gdb-6.8.91.20090917.orig/gdb/dwarf2read.c 2009-09-17 12:49:20.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/dwarf2read.c 2009-09-17 12:50:07.000000000 +0200
@@ -1717,7 +1717,7 @@ dwarf2_build_psymtabs (struct objfile *o
dwarf2_read_section (objfile, &dwarf2_per_objfile->eh_frame);
dwarf2_read_section (objfile, &dwarf2_per_objfile->frame);
@ -264,10 +264,10 @@ Index: gdb-6.8.50.20090809/gdb/dwarf2read.c
|| (objfile->global_psymbols.size == 0
&& objfile->static_psymbols.size == 0))
{
Index: gdb-6.8.50.20090809/gdb/elfread.c
Index: gdb-6.8.91.20090917/gdb/elfread.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/elfread.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/elfread.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/elfread.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/elfread.c 2009-09-17 12:50:07.000000000 +0200
@@ -681,7 +681,7 @@ elf_symfile_read (struct objfile *objfil
/* If we are reinitializing, or if we have never loaded syms yet,
set table to empty. MAINLINE is cleared so that *_read_psymtab
@ -277,11 +277,11 @@ Index: gdb-6.8.50.20090809/gdb/elfread.c
{
init_psymbol_list (objfile, 0);
mainline = 0;
Index: gdb-6.8.50.20090809/gdb/infrun.c
Index: gdb-6.8.91.20090917/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/infrun.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/infrun.c 2009-08-10 14:59:58.000000000 +0200
@@ -3531,6 +3531,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
--- gdb-6.8.91.20090917.orig/gdb/infrun.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infrun.c 2009-09-17 12:50:07.000000000 +0200
@@ -3659,6 +3659,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
#endif
target_terminal_inferior ();
@ -292,13 +292,13 @@ Index: gdb-6.8.50.20090809/gdb/infrun.c
/* If requested, stop when the dynamic linker notifies
gdb of events. This allows the user to get control
and place breakpoints in initializer routines for
Index: gdb-6.8.50.20090809/gdb/objfiles.c
Index: gdb-6.8.91.20090917/gdb/objfiles.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/objfiles.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/objfiles.c 2009-08-10 14:59:58.000000000 +0200
@@ -52,6 +52,9 @@
#include "exec.h"
--- gdb-6.8.91.20090917.orig/gdb/objfiles.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/objfiles.c 2009-09-17 12:50:20.000000000 +0200
@@ -53,6 +53,9 @@
#include "observer.h"
#include "complaints.h"
+#include "auxv.h"
+#include "elf/common.h"
@ -306,7 +306,7 @@ Index: gdb-6.8.50.20090809/gdb/objfiles.c
/* Prototypes for local functions */
static void objfile_alloc_data (struct objfile *objfile);
@@ -279,9 +282,17 @@ init_entry_point_info (struct objfile *o
@@ -280,9 +283,17 @@ init_entry_point_info (struct objfile *o
CORE_ADDR
entry_point_address (void)
{
@ -324,20 +324,10 @@ Index: gdb-6.8.50.20090809/gdb/objfiles.c
if (symfile_objfile == NULL)
return 0;
@@ -465,6 +476,9 @@ free_objfile (struct objfile *objfile)
if (objfile == symfile_objfile)
symfile_objfile = NULL;
+ if (objfile == symfile_objfile)
+ symfile_objfile = NULL;
+
/* Before the symbol table code was redone to make it easier to
selectively load and remove information particular to a specific
linkage unit, gdb used to do these things whenever the monolithic
Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
Index: gdb-6.8.91.20090917/gdb/solib-svr4.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/solib-svr4.c 2009-08-10 14:56:11.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/solib-svr4.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/solib-svr4.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solib-svr4.c 2009-09-17 12:50:07.000000000 +0200
@@ -47,6 +47,7 @@
#include "exec.h"
#include "auxv.h"
@ -905,16 +895,17 @@ Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
xfree (interp_name);
return 1;
}
@@ -1753,6 +2022,8 @@ svr4_solib_create_inferior_hook (void)
@@ -1753,6 +2022,9 @@ svr4_solib_create_inferior_hook (void)
while (tp->stop_signal != TARGET_SIGNAL_TRAP);
inf->stop_soon = NO_STOP_QUIETLY;
#endif /* defined(_SCO_DS) */
+
+ if (bfd_get_start_address (exec_bfd) != entry_point_address ())
+ disable_breakpoints_before_startup ();
}
static void
@@ -1929,6 +2200,76 @@ svr4_lp64_fetch_link_map_offsets (void)
@@ -1929,6 +2201,76 @@ svr4_lp64_fetch_link_map_offsets (void)
return lmp;
}
@ -991,7 +982,7 @@ Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
struct target_so_ops svr4_so_ops;
@@ -1969,4 +2310,7 @@ _initialize_svr4_solib (void)
@@ -1969,4 +2311,7 @@ _initialize_svr4_solib (void)
svr4_so_ops.same = svr4_same;
observer_attach_inferior_exit (solib_svr4_inferior_exit);
@ -999,11 +990,11 @@ Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
+ add_info ("linkmap", info_linkmap_command,
+ "Display the inferior's linkmap.");
}
Index: gdb-6.8.50.20090809/gdb/solib.c
Index: gdb-6.8.91.20090917/gdb/solib.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/solib.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/solib.c 2009-08-10 15:07:13.000000000 +0200
@@ -81,6 +81,8 @@ set_solib_ops (struct gdbarch *gdbarch,
--- gdb-6.8.91.20090917.orig/gdb/solib.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solib.c 2009-09-17 12:50:07.000000000 +0200
@@ -82,6 +82,8 @@ set_solib_ops (struct gdbarch *gdbarch,
/* external data declarations */
@ -1012,7 +1003,7 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
/* FIXME: gdbarch needs to control this variable, or else every
configuration needs to call set_solib_ops. */
struct target_so_ops *current_target_so_ops;
@@ -104,6 +106,8 @@ The search path for loading non-absolute
@@ -105,6 +107,8 @@ The search path for loading non-absolute
value);
}
@ -1021,7 +1012,7 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
/*
GLOBAL FUNCTION
@@ -453,14 +453,38 @@ symbol_add_stub (struct so_list *so, int
@@ -449,14 +453,38 @@ symbol_add_stub (struct so_list *so, int
/* Have we already loaded this shared object? */
ALL_OBJFILES (so->objfile)
{
@ -1059,10 +1050,10 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
+ else
+ so->objfile = symbol_file_add_from_bfd (so->abfd, flags, sap, OBJF_SHARED);
+
p_refcount = xmalloc (sizeof (*p_refcount));
*p_refcount = 2; /* Both solib and objfile refer to this abfd. */
bfd_usrdata (so->abfd) = p_refcount;
@@ -600,6 +628,10 @@ update_solib_list (int from_tty, struct
free_section_addr_info (sap);
return;
@@ -596,6 +624,10 @@ update_solib_list (int from_tty, struct
}
else
{
@ -1073,7 +1064,7 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
if (! strcmp (gdb->so_original_name, i->so_original_name))
break;
}
@@ -654,18 +686,7 @@ update_solib_list (int from_tty, struct
@@ -650,18 +682,7 @@ update_solib_list (int from_tty, struct
/* Fill in the rest of each of the `struct so_list' nodes. */
for (i = inferior; i; i = i->next)
{
@ -1093,7 +1084,7 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
/* Notify any observer that the shared object has been
loaded now that we've added it to GDB's tables. */
@@ -775,6 +796,32 @@ solib_add (char *pattern, int from_tty,
@@ -771,6 +792,32 @@ solib_add (char *pattern, int from_tty,
}
}
@ -1126,7 +1117,7 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
/*
@@ -1128,4 +1175,12 @@ This takes precedence over the environme
@@ -1189,4 +1236,12 @@ This takes precedence over the environme
reload_shared_libraries,
show_solib_search_path,
&setlist, &showlist);
@ -1139,10 +1130,10 @@ Index: gdb-6.8.50.20090809/gdb/solib.c
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
}
Index: gdb-6.8.50.20090809/gdb/solist.h
Index: gdb-6.8.91.20090917/gdb/solist.h
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/solist.h 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/solist.h 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/solist.h 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solist.h 2009-09-17 12:50:07.000000000 +0200
@@ -61,6 +61,8 @@ struct so_list
bfd *abfd;
char symbols_loaded; /* flag: symbols read in yet? */
@ -1163,10 +1154,10 @@ Index: gdb-6.8.50.20090809/gdb/solist.h
+extern int debug_solib;
+
#endif
Index: gdb-6.8.50.20090809/gdb/symfile-mem.c
Index: gdb-6.8.91.20090917/gdb/symfile-mem.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/symfile-mem.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile-mem.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile-mem.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile-mem.c 2009-09-17 12:50:07.000000000 +0200
@@ -115,7 +115,7 @@ symbol_file_add_from_memory (struct bfd
++i;
}
@ -1176,10 +1167,10 @@ Index: gdb-6.8.50.20090809/gdb/symfile-mem.c
sai, OBJF_SHARED);
/* This might change our ideas about frames already looked at. */
Index: gdb-6.8.50.20090809/gdb/symfile.c
Index: gdb-6.8.91.20090917/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/symfile.c 2009-08-10 14:59:28.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.c 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile.c 2009-09-17 12:50:07.000000000 +0200
@@ -49,6 +49,7 @@
#include "readline/readline.h"
#include "gdb_assert.h"
@ -1188,7 +1179,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
#include "observer.h"
#include "exec.h"
#include "parser-defs.h"
@@ -785,7 +786,7 @@ syms_from_objfile (struct objfile *objfi
@@ -779,7 +780,7 @@ syms_from_objfile (struct objfile *objfi
/* Now either addrs or offsets is non-zero. */
@ -1197,7 +1188,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
{
/* We will modify the main symbol table, make sure that all its users
will be cleaned up if an error occurs during symbol reading. */
@@ -813,7 +814,7 @@ syms_from_objfile (struct objfile *objfi
@@ -807,7 +808,7 @@ syms_from_objfile (struct objfile *objfi
We no longer warn if the lowest section is not a text segment (as
happens for the PA64 port. */
@ -1206,7 +1197,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
{
asection *lower_sect;
asection *sect;
@@ -896,7 +897,7 @@ syms_from_objfile (struct objfile *objfi
@@ -890,7 +891,7 @@ syms_from_objfile (struct objfile *objfi
init_objfile_sect_indices (objfile);
}
@ -1215,7 +1206,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* Discard cleanups as symbol reading was successful. */
@@ -915,17 +916,22 @@ new_symfile_objfile (struct objfile *obj
@@ -909,17 +910,22 @@ new_symfile_objfile (struct objfile *obj
/* If this is the main symbol file we have to clean up all users of the
old main symbol file. Otherwise it is sufficient to fixup all the
breakpoints that may have been redefined by this symbol file. */
@ -1240,7 +1231,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* We're done reading the symbol file; finish off complaints. */
clear_complaints (&symfile_complaints, 0, add_flags & SYMFILE_VERBOSE);
@@ -982,7 +988,7 @@ symbol_file_add_with_addrs_or_offsets (b
@@ -973,7 +979,7 @@ symbol_file_add_with_addrs_or_offsets (b
/* Give user a chance to burp if we'd be
interactively wiping out any existing symbols. */
@ -1249,7 +1240,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
&& (have_full_symbols () || have_partial_symbols ())
&& from_tty
&& (have_full_symbols () || have_partial_symbols ())
@@ -1183,6 +1189,9 @@ symbol_file_clear (int from_tty)
@@ -1163,6 +1169,9 @@ symbol_file_clear (int from_tty)
symfile_objfile->name)
: !query (_("Discard symbol table? "))))
error (_("Not confirmed."));
@ -1259,7 +1250,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
free_all_objfiles ();
@@ -3387,6 +3396,8 @@ reread_symbols (void)
@@ -3369,6 +3378,8 @@ reread_symbols (void)
/* Discard cleanups as symbol reading was successful. */
discard_cleanups (old_cleanups);
@ -1268,11 +1259,11 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* If the mtime has changed between the time we set new_modtime
and now, we *want* this to be out of date, so don't call stat
again now. */
Index: gdb-6.8.50.20090809/gdb/target.h
Index: gdb-6.8.91.20090917/gdb/target.h
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/target.h 2009-08-10 14:59:28.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/target.h 2009-08-10 14:59:58.000000000 +0200
@@ -524,7 +524,7 @@ struct target_ops
--- gdb-6.8.91.20090917.orig/gdb/target.h 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/target.h 2009-09-17 12:50:07.000000000 +0200
@@ -545,7 +545,7 @@ struct target_ops
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
int (*to_auxv_parse) (struct target_ops *ops, gdb_byte **readptr,
@ -1281,10 +1272,10 @@ Index: gdb-6.8.50.20090809/gdb/target.h
/* Search SEARCH_SPACE_LEN bytes beginning at START_ADDR for the
sequence of bytes in PATTERN with length PATTERN_LEN.
Index: gdb-6.8.50.20090809/gdb/symfile.h
Index: gdb-6.8.91.20090917/gdb/symfile.h
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/symfile.h 2009-08-10 14:59:28.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.h 2009-08-10 14:59:58.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile.h 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile.h 2009-09-17 12:50:07.000000000 +0200
@@ -229,7 +229,13 @@ enum symfile_add_flags
SYMFILE_MAINLINE = 1 << 2,
@ -1300,3 +1291,29 @@ Index: gdb-6.8.50.20090809/gdb/symfile.h
};
extern void syms_from_objfile (struct objfile *,
Index: gdb-6.8.91.20090917/gdb/infcmd.c
===================================================================
--- gdb-6.8.91.20090917.orig/gdb/infcmd.c 2009-09-17 12:49:01.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infcmd.c 2009-09-17 12:50:07.000000000 +0200
@@ -2308,6 +2308,9 @@ attach_command_post_wait (char *args, in
post_create_inferior (&current_target, from_tty);
+ /* Undo the disable from post_create_inferior. */
+ enable_breakpoints_after_startup ();
+
/* Install inferior's terminal modes. */
target_terminal_inferior ();
Index: gdb-6.8.91.20090917/gdb/linux-tdep.c
===================================================================
--- gdb-6.8.91.20090917.orig/gdb/linux-tdep.c 2009-08-04 22:41:13.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/linux-tdep.c 2009-09-17 12:50:07.000000000 +0200
@@ -163,5 +163,7 @@ in this session.\n"));
void
_initialize_linux_tdep (void)
{
+#if 0 /* gdb-6.3-pie-20050110.patch */
observer_attach_executable_changed (check_is_pie_binary);
+#endif
}

View File

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

View File

@ -1,7 +1,7 @@
Index: gdb-6.8.50.20090802/gdb/testsuite/configure.ac
Index: gdb-6.8.50.20090909/gdb/testsuite/configure.ac
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/testsuite/configure.ac 2009-07-31 17:38:16.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/testsuite/configure.ac 2009-08-03 11:10:45.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/testsuite/configure.ac 2009-07-31 17:38:16.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/configure.ac 2009-09-09 19:06:01.000000000 +0200
@@ -144,6 +144,6 @@ AC_OUTPUT([Makefile \
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
gdb.fortran/Makefile gdb.server/Makefile \
@ -10,20 +10,20 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/configure.ac
+ gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
gdb.python/Makefile gdb.reverse/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
Index: gdb-6.8.50.20090802/gdb/testsuite/configure
Index: gdb-6.8.50.20090909/gdb/testsuite/configure
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/testsuite/configure 2009-07-31 17:38:16.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/testsuite/configure 2009-08-03 11:11:27.000000000 +0200
@@ -3239,7 +3239,7 @@ done
--- gdb-6.8.50.20090909.orig/gdb/testsuite/configure 2009-08-22 18:56:43.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/configure 2009-09-09 19:06:27.000000000 +0200
@@ -3515,7 +3515,7 @@ done
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -3813,6 +3813,7 @@ do
@@ -4231,6 +4231,7 @@ do
"gdb.objc/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
@ -31,10 +31,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/configure
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
"gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.c 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach.c 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,20 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@ -56,10 +56,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.c
+ }
+ return 0;
+}
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach2.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach2.c 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach2.c 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,24 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@ -85,10 +85,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach2.c
+ }
+ return (0);
+}
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.c 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break.c 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,146 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -236,10 +236,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.c
+ }
+ return 0;
+}
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break1.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break1.c 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break1.c 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -285,10 +285,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break1.c
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/coremaker.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/coremaker.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/coremaker.c 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/coremaker.c 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,142 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
@ -432,10 +432,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/coremaker.c
+ return 0;
+}
+
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.exp 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach.exp 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,432 @@
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+
@ -869,10 +869,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/attach.exp
+do_call_attach_tests
+
+return 0
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.exp 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/break.exp 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,977 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004
@ -1851,10 +1851,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/break.exp
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+}
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/corefile.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/corefile.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/corefile.exp 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/corefile.exp 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,243 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
@ -2099,10 +2099,10 @@ Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/corefile.exp
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
+
+gdb_test "core" "No core file now."
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/Makefile.in
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.pie/Makefile.in 2009-08-03 11:10:12.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/Makefile.in 2009-09-09 19:06:01.000000000 +0200
@@ -0,0 +1,19 @@
+VPATH = @srcdir@
+srcdir = @srcdir@

View File

@ -7,20 +7,19 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
(remote_async_wait): Likewise.
Index: gdb-6.8.50.20081128/gdb/remote.c
Index: gdb-6.8.50.20090818/gdb/remote.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/remote.c 2008-12-09 16:59:51.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/remote.c 2008-12-09 17:00:04.000000000 +0100
@@ -4329,8 +4329,13 @@ Packet: '%s'\n"),
--- gdb-6.8.50.20090818.orig/gdb/remote.c 2009-08-18 21:00:35.000000000 +0200
+++ gdb-6.8.50.20090818/gdb/remote.c 2009-08-18 21:04:46.000000000 +0200
@@ -4408,8 +4408,13 @@ Packet: '%s'\n"),
VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
}
- if (*p != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ /* It may also occur on amd64 which defaults to 32-bit i386
+ target. gdbserver(1) is not aware of the `set architecture'
+ name itself as it is not using libbfd. */
+ if (*p != ';')
if (*p != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ error (_("Remote register badly formatted: %s\nhere: %s"
+ "\nTry to load the executable by `file' first,"
+ "\nyou may also check `set/show architecture'."),

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
Index: gdb-6.8.50.20090809/gdb/corelow.c
Index: gdb-6.8.50.20090909/gdb/corelow.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/corelow.c 2009-07-31 17:25:21.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/corelow.c 2009-08-10 14:56:11.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/corelow.c 2009-07-31 17:25:21.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/corelow.c 2009-09-09 19:09:35.000000000 +0200
@@ -45,6 +45,10 @@
#include "exceptions.h"
#include "solib.h"
@ -89,11 +89,11 @@ Index: gdb-6.8.50.20090809/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
Index: gdb-6.8.50.20090809/gdb/doc/gdb.texinfo
Index: gdb-6.8.50.20090909/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/doc/gdb.texinfo 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/doc/gdb.texinfo 2009-08-10 14:56:11.000000000 +0200
@@ -13733,6 +13733,27 @@ information files.
--- gdb-6.8.50.20090909.orig/gdb/doc/gdb.texinfo 2009-09-09 19:09:31.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/doc/gdb.texinfo 2009-09-09 19:09:35.000000000 +0200
@@ -13764,6 +13764,27 @@ information files.
@end table
@ -121,10 +121,10 @@ Index: gdb-6.8.50.20090809/gdb/doc/gdb.texinfo
@cindex @code{.gnu_debuglink} sections
@cindex debug link sections
A debug link is a special section of the executable file named
Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
Index: gdb-6.8.50.20090909/gdb/solib-svr4.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/solib-svr4.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/solib-svr4.c 2009-08-10 14:56:11.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/solib-svr4.c 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/solib-svr4.c 2009-09-09 19:09:35.000000000 +0200
@@ -1101,9 +1101,33 @@ svr4_current_sos (void)
safe_strerror (errcode));
else
@ -162,11 +162,11 @@ Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
}
xfree (buffer);
Index: gdb-6.8.50.20090809/gdb/symfile.c
Index: gdb-6.8.50.20090909/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/symfile.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.c 2009-08-10 14:58:53.000000000 +0200
@@ -55,6 +55,7 @@
--- gdb-6.8.50.20090909.orig/gdb/symfile.c 2009-09-09 19:09:31.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile.c 2009-09-09 19:09:55.000000000 +0200
@@ -56,6 +56,7 @@
#include "elf-bfd.h"
#include "solib.h"
#include "remote.h"
@ -174,7 +174,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
#include <sys/types.h>
#include <fcntl.h>
@@ -1195,16 +1196,65 @@ symbol_file_clear (int from_tty)
@@ -1174,16 +1175,65 @@ symbol_file_clear (int from_tty)
printf_unfiltered (_("No symbol file now.\n"));
}
@ -242,7 +242,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
{
struct build_id *retval;
@@ -1220,6 +1270,348 @@ build_id_bfd_get (bfd *abfd)
@@ -1199,6 +1249,348 @@ build_id_bfd_get (bfd *abfd)
return retval;
}
@ -591,7 +591,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int
@@ -1237,7 +1629,7 @@ build_id_verify (const char *filename, s
@@ -1216,7 +1608,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL)
return 0;
@ -600,7 +600,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename);
@@ -1256,8 +1648,9 @@ build_id_verify (const char *filename, s
@@ -1235,8 +1627,9 @@ build_id_verify (const char *filename, s
return retval;
}
@ -612,7 +612,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
{
char *link, *s, *retval = NULL;
gdb_byte *data = build_id->data;
@@ -1265,7 +1658,9 @@ build_id_to_debug_filename (struct build
@@ -1244,7 +1637,9 @@ build_id_to_debug_filename (struct build
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@ -623,7 +623,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
if (size > 0)
{
@@ -1276,12 +1671,14 @@ build_id_to_debug_filename (struct build
@@ -1255,12 +1650,14 @@ build_id_to_debug_filename (struct build
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@ -640,7 +640,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
if (retval != NULL && !build_id_verify (retval, build_id))
{
@@ -1289,9 +1686,150 @@ build_id_to_debug_filename (struct build
@@ -1268,9 +1665,150 @@ build_id_to_debug_filename (struct build
retval = NULL;
}
@ -791,7 +791,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
static char *
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
{
@@ -1374,32 +1912,36 @@ static char *
@@ -1353,32 +1891,36 @@ static char *
find_separate_debug_file (struct objfile *objfile)
{
asection *sect;
@ -836,7 +836,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
}
basename = get_debug_link_info (objfile, &crc32);
@@ -1407,7 +1949,7 @@ find_separate_debug_file (struct objfile
@@ -1386,7 +1928,7 @@ find_separate_debug_file (struct objfile
if (basename == NULL)
/* There's no separate debug info, hence there's no way we could
load it => no warning. */
@ -845,7 +845,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
dir = xstrdup (objfile->name);
@@ -1429,24 +1971,19 @@ find_separate_debug_file (struct objfile
@@ -1408,24 +1950,19 @@ find_separate_debug_file (struct objfile
if (canon_name && strlen (canon_name) > i)
i = strlen (canon_name);
@ -877,7 +877,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
strcpy (debugfile, dir);
@@ -1455,12 +1992,7 @@ find_separate_debug_file (struct objfile
@@ -1434,12 +1971,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@ -891,7 +891,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* Then try in the global debugfile directory. */
strcpy (debugfile, debug_file_directory);
@@ -1469,12 +2001,7 @@ find_separate_debug_file (struct objfile
@@ -1448,12 +1980,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@ -905,7 +905,7 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
/* If the file is in the sysroot, try using its base path in the
global debugfile directory. */
@@ -1488,21 +2015,18 @@ find_separate_debug_file (struct objfile
@@ -1467,20 +1994,18 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@ -913,7 +913,6 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
- xfree (canon_name);
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
@ -934,10 +933,10 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
}
@@ -4254,4 +4778,16 @@ Show printing of symbol loading messages
@@ -4231,4 +4756,16 @@ the global debug-file directory prepende
NULL,
NULL,
&setprintlist, &showprintlist);
show_debug_file_directory,
&setlist, &showlist);
+
+ add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
+ _("\
@ -951,11 +950,11 @@ Index: gdb-6.8.50.20090809/gdb/symfile.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
}
Index: gdb-6.8.50.20090809/gdb/symfile.h
Index: gdb-6.8.50.20090909/gdb/symfile.h
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/symfile.h 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.h 2009-08-10 14:56:11.000000000 +0200
@@ -388,6 +388,13 @@ extern int symfile_map_offsets_to_segmen
--- gdb-6.8.50.20090909.orig/gdb/symfile.h 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile.h 2009-09-09 19:09:35.000000000 +0200
@@ -381,6 +381,13 @@ extern int symfile_map_offsets_to_segmen
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
void free_symfile_segment_data (struct symfile_segment_data *data);
@ -969,10 +968,10 @@ Index: gdb-6.8.50.20090809/gdb/symfile.h
/* From dwarf2read.c */
extern int dwarf2_has_info (struct objfile *);
Index: gdb-6.8.50.20090809/gdb/testsuite/lib/gdb.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/testsuite/lib/gdb.exp 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/testsuite/lib/gdb.exp 2009-08-10 14:56:11.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/testsuite/lib/gdb.exp 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/lib/gdb.exp 2009-09-09 19:09:35.000000000 +0200
@@ -1248,6 +1248,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
@ -990,10 +989,10 @@ Index: gdb-6.8.50.20090809/gdb/testsuite/lib/gdb.exp
return 0;
}
Index: gdb-6.8.50.20090809/gdb/testsuite/lib/mi-support.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/lib/mi-support.exp
===================================================================
--- gdb-6.8.50.20090809.orig/gdb/testsuite/lib/mi-support.exp 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/testsuite/lib/mi-support.exp 2009-08-10 14:56:11.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/testsuite/lib/mi-support.exp 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/lib/mi-support.exp 2009-09-09 19:09:35.000000000 +0200
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20081128/gdb/infrun.c
Index: gdb-6.8.50.20090811/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/infrun.c 2008-12-09 15:56:16.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/infrun.c 2008-12-09 15:56:59.000000000 +0100
@@ -931,7 +931,7 @@ static const char *scheduler_enums[] = {
--- gdb-6.8.50.20090811.orig/gdb/infrun.c 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/infrun.c 2009-08-12 07:13:08.000000000 +0200
@@ -1075,7 +1075,7 @@ static const char *scheduler_enums[] = {
schedlock_step,
NULL
};
@ -11,10 +11,10 @@ Index: gdb-6.8.50.20081128/gdb/infrun.c
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-console.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi-console.exp 2008-08-06 14:52:08.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp 2008-12-09 15:59:34.000000000 +0100
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi-console.exp 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-console.exp 2009-08-12 06:58:45.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
@ -25,10 +25,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp
# Next over the hello() call which will produce lots of output
mi_gdb_test "220-exec-next" \
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi2-console.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2008-08-06 14:52:08.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp 2008-12-09 16:00:33.000000000 +0100
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi2-console.exp 2009-08-12 06:58:45.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
@ -39,3 +39,16 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp
# Next over the hello() call which will produce lots of output
send_gdb "220-exec-next\n"
gdb_expect {
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-cli.exp
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2009-06-09 19:12:42.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-cli.exp 2009-08-12 07:13:32.000000000 +0200
@@ -173,7 +173,7 @@ mi_execute_to "exec-continue" "breakpoin
# Test that the token is output even for CLI commands
# Also test that *stopped includes frame information.
mi_gdb_test "34 next" \
- ".*34\\\^running.*\\*running,thread-id=\"all\"" \
+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
"34 next: run"
if {!$async} {

View File

@ -0,0 +1,60 @@
Index: gdb-6.8.50.20090811/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/linux-nat.c 2009-08-12 07:21:20.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/linux-nat.c 2009-08-12 08:11:25.000000000 +0200
@@ -1656,16 +1656,18 @@ resume_set_callback (struct lwp_info *lp
static void
linux_nat_resume (struct target_ops *ops,
- ptid_t ptid, int step, enum target_signal signo)
+ ptid_t ptid, int step_int, enum target_signal signo)
{
sigset_t prev_mask;
struct lwp_info *lp;
int resume_many;
+ enum resume_step step = step_int;
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
- step ? "step" : "resume",
+ (step == RESUME_STEP_NEEDED
+ ? "needed" : (step ? "step" : "resume")),
target_pid_to_str (ptid),
signo ? strsignal (signo) : "0",
target_pid_to_str (inferior_ptid));
@@ -2625,10 +2627,34 @@ linux_nat_filter_event (int lwpid, int s
if (num_lwps (GET_PID (lp->ptid)) > 1)
{
+ enum resume_step step = lp->step;
+ pid_t pid = GET_PID (lp->ptid);
+
/* If there is at least one more LWP, then the exit signal
was not the end of the debugged application and should be
ignored. */
exit_lwp (lp);
+
+ if (step == RESUME_STEP_USER)
+ {
+ /* Now stop the closest LWP's ... */
+ lp = find_lwp_pid (pid_to_ptid (pid));
+ if (!lp)
+ lp = lwp_list;
+ gdb_assert (lp != NULL);
+ errno = 0;
+ ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
+ (void *) (unsigned long) SIGSTOP);
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno)
+ : "OK");
+ /* Avoid the silent `delayed SIGSTOP' handling. */
+ lp->signalled = 0;
+ }
+
return NULL;
}
}

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20090803/bfd/elf-bfd.h
Index: gdb-6.8.50.20090910/bfd/elf-bfd.h
===================================================================
--- gdb-6.8.50.20090803.orig/bfd/elf-bfd.h 2009-07-23 15:00:20.000000000 +0200
+++ gdb-6.8.50.20090803/bfd/elf-bfd.h 2009-08-03 17:21:25.000000000 +0200
@@ -2115,7 +2115,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
--- gdb-6.8.50.20090910.orig/bfd/elf-bfd.h 2009-09-09 23:38:57.000000000 +0200
+++ gdb-6.8.50.20090910/bfd/elf-bfd.h 2009-09-10 23:01:15.000000000 +0200
@@ -2121,7 +2121,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo
@ -11,11 +11,11 @@ Index: gdb-6.8.50.20090803/bfd/elf-bfd.h
extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
Index: gdb-6.8.50.20090803/bfd/elf.c
Index: gdb-6.8.50.20090910/bfd/elf.c
===================================================================
--- gdb-6.8.50.20090803.orig/bfd/elf.c 2009-07-23 15:00:20.000000000 +0200
+++ gdb-6.8.50.20090803/bfd/elf.c 2009-08-03 17:23:13.000000000 +0200
@@ -8381,6 +8381,7 @@ char *
--- gdb-6.8.50.20090910.orig/bfd/elf.c 2009-09-09 23:38:57.000000000 +0200
+++ gdb-6.8.50.20090910/bfd/elf.c 2009-09-10 23:04:17.000000000 +0200
@@ -8398,6 +8398,7 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
@ -23,7 +23,7 @@ Index: gdb-6.8.50.20090803/bfd/elf.c
const char *fname,
const char *psargs)
{
@@ -8407,9 +8408,15 @@ elfcore_write_prpsinfo (bfd *abfd,
@@ -8424,9 +8425,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
@ -42,7 +42,7 @@ Index: gdb-6.8.50.20090803/bfd/elf.c
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
@@ -8424,9 +8431,15 @@ elfcore_write_prpsinfo (bfd *abfd,
@@ -8441,9 +8448,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
@ -61,10 +61,10 @@ Index: gdb-6.8.50.20090803/bfd/elf.c
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
Index: gdb-6.8.50.20090803/gdb/amd64-linux-nat.c
Index: gdb-6.8.50.20090910/gdb/amd64-linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/amd64-linux-nat.c 2009-08-03 17:19:57.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/amd64-linux-nat.c 2009-08-03 17:21:25.000000000 +0200
--- gdb-6.8.50.20090910.orig/gdb/amd64-linux-nat.c 2009-09-10 23:01:07.000000000 +0200
+++ gdb-6.8.50.20090910/gdb/amd64-linux-nat.c 2009-09-10 23:01:15.000000000 +0200
@@ -140,6 +140,7 @@ static int amd64_linux_gregset32_reg_off
static char *
@ -98,10 +98,10 @@ Index: gdb-6.8.50.20090803/gdb/amd64-linux-nat.c
}
static void
Index: gdb-6.8.50.20090803/gdb/fbsd-nat.c
Index: gdb-6.8.50.20090910/gdb/fbsd-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/fbsd-nat.c 2009-07-02 19:21:06.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/fbsd-nat.c 2009-08-03 17:21:25.000000000 +0200
--- gdb-6.8.50.20090910.orig/gdb/fbsd-nat.c 2009-07-02 19:21:06.000000000 +0200
+++ gdb-6.8.50.20090910/gdb/fbsd-nat.c 2009-09-10 23:01:15.000000000 +0200
@@ -211,6 +211,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
@ -110,10 +110,10 @@ Index: gdb-6.8.50.20090803/gdb/fbsd-nat.c
fname, psargs);
}
Index: gdb-6.8.50.20090803/gdb/linux-nat.c
Index: gdb-6.8.50.20090910/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-03 17:19:56.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-03 17:24:03.000000000 +0200
--- gdb-6.8.50.20090910.orig/gdb/linux-nat.c 2009-09-10 23:01:06.000000000 +0200
+++ gdb-6.8.50.20090910/gdb/linux-nat.c 2009-09-10 23:01:15.000000000 +0200
@@ -55,6 +55,7 @@
#include "xml-support.h"
#include "terminal.h"
@ -131,7 +131,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
static char *
@@ -3840,6 +3841,159 @@ linux_spu_make_corefile_notes (bfd *obfd
@@ -3946,6 +3947,159 @@ linux_spu_make_corefile_notes (bfd *obfd
return args.note_data;
}
@ -291,7 +291,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
@@ -3860,8 +4014,14 @@ linux_nat_make_corefile_notes (bfd *obfd
@@ -3966,8 +4120,14 @@ linux_nat_make_corefile_notes (bfd *obfd
if (get_exec_file (0))
{
@ -306,7 +306,7 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
if (get_inferior_args ())
{
char *string_end;
@@ -3877,9 +4037,15 @@ linux_nat_make_corefile_notes (bfd *obfd
@@ -3983,9 +4143,15 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end);
}
}
@ -324,11 +324,11 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.c
}
/* Dump information for threads. */
Index: gdb-6.8.50.20090803/gdb/linux-nat.h
Index: gdb-6.8.50.20090910/gdb/linux-nat.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.h 2009-08-03 17:19:56.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/linux-nat.h 2009-08-03 17:21:25.000000000 +0200
@@ -148,7 +148,7 @@ struct siginfo *linux_nat_get_siginfo (p
--- gdb-6.8.50.20090910.orig/gdb/linux-nat.h 2009-09-10 23:01:06.000000000 +0200
+++ gdb-6.8.50.20090910/gdb/linux-nat.h 2009-09-10 23:01:15.000000000 +0200
@@ -154,7 +154,7 @@ struct siginfo *linux_nat_get_siginfo (p
/* These functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
extern char *(*linux_elfcore_write_prpsinfo)
@ -337,10 +337,10 @@ Index: gdb-6.8.50.20090803/gdb/linux-nat.h
extern char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *);
extern char *(*linux_elfcore_write_prfpreg)
Index: gdb-6.8.50.20090803/gdb/procfs.c
Index: gdb-6.8.50.20090910/gdb/procfs.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/procfs.c 2009-08-01 02:02:04.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/procfs.c 2009-08-03 17:21:25.000000000 +0200
--- gdb-6.8.50.20090910.orig/gdb/procfs.c 2009-08-01 02:02:04.000000000 +0200
+++ gdb-6.8.50.20090910/gdb/procfs.c 2009-09-10 23:01:15.000000000 +0200
@@ -6147,6 +6147,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data,

View File

@ -5,33 +5,30 @@ gdb/
* config.in: Regenerate.
* configure: Regenerate.
Index: gdb-6.8.50.20090803/gdb/configure.ac
Index: gdb-6.8.50.20090909/gdb/configure.ac
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/configure.ac 2009-08-04 06:32:39.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/configure.ac 2009-08-04 06:33:51.000000000 +0200
@@ -30,6 +30,7 @@ AC_GNU_SOURCE
AC_AIX
AC_ISC_POSIX
--- 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.20090803/gdb/config.in
Index: gdb-6.8.50.20090909/gdb/config.in
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/config.in 2009-08-04 06:32:39.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/config.in 2009-08-04 06:33:51.000000000 +0200
@@ -744,6 +744,9 @@
# undef _ALL_SOURCE
--- 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
+
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
@@ -753,6 +756,9 @@
/* 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
@ -41,11 +38,19 @@ Index: gdb-6.8.50.20090803/gdb/config.in
/* Define to 1 if on MINIX. */
#undef _MINIX
Index: gdb-6.8.50.20090803/gdb/configure
Index: gdb-6.8.50.20090909/gdb/configure
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/configure 2009-08-04 06:32:39.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/configure 2009-08-04 06:33:51.000000000 +0200
@@ -874,6 +874,7 @@ Optional Features:
--- 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
@ -53,21 +58,21 @@ Index: gdb-6.8.50.20090803/gdb/configure
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-targets=TARGETS
@@ -3347,6 +3348,370 @@ _ACEOF
@@ -4100,6 +4102,204 @@ fi
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval="$enable_largefile"
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+fi;
+if test "$enable_largefile" != no; then
+
+ echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $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
@ -75,11 +80,7 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
@ -98,89 +99,34 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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_compile "$LINENO"; then :
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+{ $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
+
+ echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $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
+ ac_cv_sys_file_offset_bits=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
@ -199,40 +145,11 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+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>
@ -252,60 +169,33 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
+
+{ $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
+
+fi
+rm -f conftest*
+ echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+;;
+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
+ ac_cv_sys_large_files=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
@ -324,40 +214,11 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+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>
@ -377,48 +238,26 @@ Index: gdb-6.8.50.20090803/gdb/configure
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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_objext'
+ { (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_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+
+{ $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
+rm -f conftest*
+fi
+

View File

@ -1,9 +1,9 @@
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
Index: gdb-6.8.50.20090803/gdb/dwarf2loc.c
Index: gdb-6.8.50.20090909/gdb/dwarf2loc.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/dwarf2loc.c 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/dwarf2loc.c 2009-08-04 06:33:35.000000000 +0200
--- gdb-6.8.50.20090909.orig/gdb/dwarf2loc.c 2009-09-09 20:08:03.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dwarf2loc.c 2009-09-09 20:10:35.000000000 +0200
@@ -56,7 +56,9 @@ find_location_expression (struct dwarf2_
CORE_ADDR low, high;
gdb_byte *loc_ptr, *buf_end;
@ -15,10 +15,10 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2loc.c
struct gdbarch *gdbarch = get_objfile_arch (objfile);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int addr_size = dwarf2_per_cu_addr_size (baton->per_cu);
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2009-08-04 06:33:35.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2009-09-09 20:10:35.000000000 +0200
@@ -0,0 +1,102 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
@ -122,10 +122,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
+
+# `abort' can get expressed as `*__GI_abort'.
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2009-08-04 06:33:35.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2009-09-09 20:10:35.000000000 +0200
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -153,10 +153,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
+ func ();
+ return 0;
+}
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2009-08-04 06:33:35.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2009-09-09 20:10:35.000000000 +0200
@@ -0,0 +1,328 @@
+/* This testcase is part of GDB, the GNU debugger.
+

View File

@ -1,8 +1,8 @@
Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/dwarf2read.c 2009-08-04 06:32:58.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/dwarf2read.c 2009-08-04 06:33:18.000000000 +0200
@@ -2459,6 +2459,7 @@ scan_partial_symbols (struct partial_die
--- gdb-6.8.50.20090811.orig/gdb/dwarf2read.c 2009-08-13 10:14:45.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/dwarf2read.c 2009-08-13 10:22:36.000000000 +0200
@@ -2480,6 +2480,7 @@ scan_partial_symbols (struct partial_die
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
break;
case DW_TAG_variable:
@ -10,7 +10,7 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
@@ -2654,6 +2655,7 @@ add_partial_symbol (struct partial_die_i
@@ -2675,6 +2676,7 @@ add_partial_symbol (struct partial_die_i
}
break;
case DW_TAG_variable:
@ -18,7 +18,15 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
if (pdi->is_external)
{
/* Global Variable.
@@ -4790,7 +4792,8 @@ dwarf2_add_field (struct field_info *fip
@@ -2805,6 +2807,7 @@ die_needs_namespace (struct die_info *di
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;
}
}
@ -28,7 +36,7 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
{
/* C++ static member. */
@@ -5297,7 +5300,8 @@ read_structure_type (struct die_info *di
@@ -5233,7 +5237,8 @@ read_structure_type (struct die_info *di
while (child_die && child_die->tag)
{
if (child_die->tag == DW_TAG_member
@ -38,7 +46,7 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
{
/* NOTE: carlton/2002-11-05: A C++ static data member
should be a DW_TAG_member that is a declaration, but
@@ -5416,6 +5420,7 @@ process_structure_scope (struct die_info
@@ -5352,6 +5357,7 @@ process_structure_scope (struct die_info
{
if (child_die->tag == DW_TAG_member
|| child_die->tag == DW_TAG_variable
@ -46,15 +54,15 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
|| child_die->tag == DW_TAG_inheritance)
{
/* Do nothing. */
@@ -6926,6 +6931,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
@@ -6980,6 +6986,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable
+ && abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_module
&& abbrev->tag != DW_TAG_member)
{
@@ -7033,6 +7039,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
@@ -7088,6 +7095,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
if (load_all
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_variable
@ -62,7 +70,7 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
|| abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration)
{
@@ -8840,6 +8847,11 @@ new_symbol (struct die_info *die, struct
@@ -8901,6 +8909,11 @@ new_symbol (struct die_info *die, struct
/* Do not add the symbol to any lists. It will be found via
BLOCK_FUNCTION from the blockvector. */
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:
gdb.mi/mi-nsmoribund.exp
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-bt.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-bt.c 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,10 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -28,10 +28,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-bt.c
inline int func1(void)
{
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.c 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,13 +13,19 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -54,10 +54,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.c
inline int func1(void)
{
bar ();
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.exp
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-09-17 12:49:01.000000000 +0200
@@ -230,7 +230,7 @@ set line3 [gdb_get_line_number "set brea
gdb_breakpoint $line3
gdb_continue_to_breakpoint "consecutive func1"
@ -110,10 +110,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-cmds.exp
+gdb_test "info frame" "inlined into frame.*" "outer_inline2 inlined"
+gdb_test "fini" "" "up from outer_inline2"
+gdb_test "info frame" " in main \[^\n\]*\n source language.*" "main not inlined"
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.c 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,11 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -133,10 +133,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.c
inline int func1(int arg1)
{
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.exp
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-06-30 17:50:27.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.exp 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-06-30 17:50:27.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp 2009-09-17 12:49:01.000000000 +0200
@@ -77,6 +77,9 @@ if { ! $no_frames } {
# Make sure that locals on the stack are found. This is an array to
@ -155,11 +155,11 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-locals.exp
+ setup_kfail *-*-* "gcc/debug.optimization"
+}
gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
Index: gdb-6.8.50.20090803/gdb/frame.c
Index: gdb-6.8.91.20090917/gdb/frame.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/frame.c 2009-08-03 15:56:08.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/frame.c 2009-08-03 16:57:40.000000000 +0200
@@ -276,7 +276,7 @@ fprint_frame (struct ui_file *file, stru
--- gdb-6.8.91.20090917.orig/gdb/frame.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/frame.c 2009-09-17 12:49:01.000000000 +0200
@@ -310,7 +310,7 @@ fprint_frame (struct ui_file *file, stru
static struct frame_info *
skip_inlined_frames (struct frame_info *frame)
{
@ -168,7 +168,7 @@ Index: gdb-6.8.50.20090803/gdb/frame.c
frame = get_prev_frame (frame);
return frame;
@@ -1715,6 +1715,7 @@ get_frame_address_in_block (struct frame
@@ -1778,6 +1778,7 @@ get_frame_address_in_block (struct frame
{
/* A draft address. */
CORE_ADDR pc = get_frame_pc (this_frame);
@ -176,7 +176,7 @@ Index: gdb-6.8.50.20090803/gdb/frame.c
struct frame_info *next_frame = this_frame->next;
@@ -1757,6 +1758,9 @@ get_frame_address_in_block (struct frame
@@ -1820,6 +1821,9 @@ get_frame_address_in_block (struct frame
while in an inlined function, then the code address of the
"calling" normal function should not be adjusted either. */
@ -186,7 +186,7 @@ Index: gdb-6.8.50.20090803/gdb/frame.c
while (get_frame_type (next_frame) == INLINE_FRAME)
next_frame = next_frame->next;
@@ -1788,7 +1792,7 @@ find_frame_sal (struct frame_info *frame
@@ -1851,7 +1855,7 @@ find_frame_sal (struct frame_info *frame
sym = inline_skipped_symbol (inferior_ptid);
init_sal (sal);
@ -195,19 +195,19 @@ Index: gdb-6.8.50.20090803/gdb/frame.c
{
sal->symtab = SYMBOL_SYMTAB (sym);
sal->line = SYMBOL_LINE (sym);
Index: gdb-6.8.50.20090803/gdb/breakpoint.c
Index: gdb-6.8.91.20090917/gdb/breakpoint.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/breakpoint.c 2009-08-03 16:56:10.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/breakpoint.c 2009-08-03 17:19:24.000000000 +0200
@@ -60,6 +60,7 @@
#include "wrapper.h"
#include "valprint.h"
--- gdb-6.8.91.20090917.orig/gdb/breakpoint.c 2009-09-17 12:48:51.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/breakpoint.c 2009-09-17 12:49:12.000000000 +0200
@@ -62,6 +62,7 @@
#include "jit.h"
#include "xml-syscall.h"
#include "parser-defs.h"
+#include "inline-frame.h"
/* readline include files */
#include "readline/readline.h"
@@ -3065,10 +3066,24 @@ bpstat_check_breakpoint_conditions (bpst
@@ -3220,10 +3221,24 @@ bpstat_check_breakpoint_conditions (bpst
const struct bp_location *bl = bs->breakpoint_at;
struct breakpoint *b = bl->owner;
@ -236,7 +236,7 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
{
int value_is_zero = 0;
@@ -3215,6 +3230,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
@@ -3383,6 +3398,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->print = 0;
}
bs->commands = copy_command_lines (bs->commands);
@ -249,7 +249,7 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
}
/* Print nothing for this entry if we dont stop or if we dont print. */
@@ -5164,9 +5185,9 @@ set_momentary_breakpoint (struct gdbarch
@@ -5572,9 +5593,9 @@ set_momentary_breakpoint (struct gdbarch
{
struct breakpoint *b;
@ -262,11 +262,11 @@ Index: gdb-6.8.50.20090803/gdb/breakpoint.c
b = set_raw_breakpoint (gdbarch, sal, type);
b->enable_state = bp_enabled;
Index: gdb-6.8.50.20090803/gdb/inline-frame.c
Index: gdb-6.8.91.20090917/gdb/inline-frame.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/inline-frame.c 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/inline-frame.c 2009-08-03 16:57:40.000000000 +0200
@@ -195,6 +195,12 @@ inline_frame_sniffer (const struct frame
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.c 2009-09-13 18:28:28.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/inline-frame.c 2009-09-17 12:49:01.000000000 +0200
@@ -199,6 +199,12 @@ inline_frame_sniffer (const struct frame
if (frame_block == NULL)
return 0;
@ -279,7 +279,7 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
/* Calculate DEPTH, the number of inlined functions at this
location. */
depth = 0;
@@ -204,6 +210,10 @@ inline_frame_sniffer (const struct frame
@@ -208,6 +214,10 @@ inline_frame_sniffer (const struct frame
if (block_inlined_p (cur_block))
depth++;
@ -290,7 +290,7 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
cur_block = BLOCK_SUPERBLOCK (cur_block);
}
@@ -287,7 +297,6 @@ skip_inline_frames (ptid_t ptid)
@@ -291,7 +301,6 @@ skip_inline_frames (ptid_t ptid)
{
CORE_ADDR this_pc;
struct block *frame_block, *cur_block;
@ -298,7 +298,7 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
int skip_count = 0;
struct inline_state *state;
@@ -308,10 +317,7 @@ skip_inline_frames (ptid_t ptid)
@@ -312,10 +321,7 @@ skip_inline_frames (ptid_t ptid)
of BLOCK_START. */
if (BLOCK_START (cur_block) == this_pc
|| block_starting_point_at (this_pc, cur_block))
@ -310,7 +310,7 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
else
break;
}
@@ -323,7 +329,6 @@ skip_inline_frames (ptid_t ptid)
@@ -327,7 +333,6 @@ skip_inline_frames (ptid_t ptid)
state = allocate_inline_frame_state (ptid);
state->skipped_frames = skip_count;
state->saved_pc = this_pc;
@ -318,7 +318,7 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
if (skip_count != 0)
reinit_frame_cache ();
@@ -341,6 +346,23 @@ step_into_inline_frame (ptid_t ptid)
@@ -345,6 +350,23 @@ step_into_inline_frame (ptid_t ptid)
reinit_frame_cache ();
}
@ -342,10 +342,10 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.c
/* Return the number of hidden functions inlined into the current
frame. */
Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-markers.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-markers.c 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c 2009-09-17 12:49:01.000000000 +0200
@@ -15,11 +15,6 @@
extern int x, y;
@ -358,11 +358,11 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/gdb.opt/inline-markers.c
void marker(void)
{
x += y; /* set breakpoint 2 here */
Index: gdb-6.8.50.20090803/gdb/gdbthread.h
Index: gdb-6.8.91.20090917/gdb/gdbthread.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/gdbthread.h 2009-08-03 15:55:53.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/gdbthread.h 2009-08-03 16:57:40.000000000 +0200
@@ -187,6 +187,12 @@ struct thread_info
--- gdb-6.8.91.20090917.orig/gdb/gdbthread.h 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/gdbthread.h 2009-09-17 12:49:01.000000000 +0200
@@ -191,6 +191,12 @@ struct thread_info
/* Private data used by the target vector implementation. */
struct private_thread_info *private;
@ -375,11 +375,11 @@ Index: gdb-6.8.50.20090803/gdb/gdbthread.h
};
/* Create an empty thread list, or empty the existing one. */
Index: gdb-6.8.50.20090803/gdb/infcmd.c
Index: gdb-6.8.91.20090917/gdb/infcmd.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/infcmd.c 2009-07-02 23:57:27.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/infcmd.c 2009-08-03 17:17:24.000000000 +0200
@@ -1408,11 +1408,11 @@ finish_command_continuation (void *arg)
--- gdb-6.8.91.20090917.orig/gdb/infcmd.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infcmd.c 2009-09-17 12:49:01.000000000 +0200
@@ -1434,11 +1434,11 @@ finish_command_continuation (void *arg)
struct type *value_type;
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (a->function));
@ -393,9 +393,9 @@ Index: gdb-6.8.50.20090803/gdb/infcmd.c
print_return_value (SYMBOL_TYPE (a->function), value_type);
}
@@ -1514,6 +1514,16 @@ finish_forward (struct symbol *function,
old_chain = make_cleanup_delete_breakpoint (breakpoint);
@@ -1546,6 +1546,16 @@ finish_forward (struct symbol *function,
tp->initiating_frame = get_frame_id (frame);
make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
+ /* We should _always_ set CURRENT_PC_IS_NOTCURRENT here to always see the
+ calling line with the message `Value returned is ...'. Currently it is
@ -410,7 +410,7 @@ Index: gdb-6.8.50.20090803/gdb/infcmd.c
tp->proceed_to_finish = 1; /* We want stop_registers, please... */
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
@@ -1535,7 +1545,9 @@ finish_forward (struct symbol *function,
@@ -1567,7 +1577,9 @@ finish_forward (struct symbol *function,
static void
finish_command (char *arg, int from_tty)
{
@ -421,7 +421,7 @@ Index: gdb-6.8.50.20090803/gdb/infcmd.c
struct symbol *function;
int async_exec = 0;
@@ -1566,45 +1578,63 @@ finish_command (char *arg, int from_tty)
@@ -1598,45 +1610,63 @@ finish_command (char *arg, int from_tty)
if (!target_has_execution)
error (_("The program is not running."));
@ -502,7 +502,7 @@ Index: gdb-6.8.50.20090803/gdb/infcmd.c
/* Print info on the selected frame, including level number but not
source. */
@@ -1618,10 +1648,14 @@ finish_command (char *arg, int from_tty)
@@ -1650,10 +1680,14 @@ finish_command (char *arg, int from_tty)
print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
}
@ -518,22 +518,22 @@ Index: gdb-6.8.50.20090803/gdb/infcmd.c
}
Index: gdb-6.8.50.20090803/gdb/target.c
Index: gdb-6.8.91.20090917/gdb/target.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/target.c 2009-08-03 16:04:15.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/target.c 2009-08-03 16:57:40.000000000 +0200
@@ -2079,6 +2079,7 @@ target_resume (ptid_t ptid, int step, en
--- gdb-6.8.91.20090917.orig/gdb/target.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/target.c 2009-09-17 12:49:01.000000000 +0200
@@ -2187,6 +2187,7 @@ target_resume (ptid_t ptid, int step, en
{
struct target_ops *t;
+ clear_inline_frame_state (ptid);
dcache_invalidate (target_dcache);
target_dcache_invalidate ();
for (t = current_target.beneath; t != NULL; t = t->beneath)
Index: gdb-6.8.50.20090803/gdb/inline-frame.h
Index: gdb-6.8.91.20090917/gdb/inline-frame.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/inline-frame.h 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/inline-frame.h 2009-08-03 16:57:40.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.h 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/inline-frame.h 2009-09-17 12:49:01.000000000 +0200
@@ -43,6 +43,10 @@ void clear_inline_frame_state (ptid_t pt
void step_into_inline_frame (ptid_t ptid);
@ -545,11 +545,11 @@ Index: gdb-6.8.50.20090803/gdb/inline-frame.h
/* Return the number of hidden functions inlined into the current
frame. */
Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
Index: gdb-6.8.91.20090917/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/dwarf2read.c 2009-08-03 16:56:10.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/dwarf2read.c 2009-08-03 16:57:40.000000000 +0200
@@ -4107,6 +4107,7 @@ read_func_scope (struct die_info *die, s
--- gdb-6.8.91.20090917.orig/gdb/dwarf2read.c 2009-09-17 12:48:51.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/dwarf2read.c 2009-09-17 12:49:01.000000000 +0200
@@ -4128,6 +4128,7 @@ read_func_scope (struct die_info *die, s
struct block *block;
unsigned die_children = 0;
int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
@ -557,7 +557,7 @@ Index: gdb-6.8.50.20090803/gdb/dwarf2read.c
if (inlined_func)
{
@@ -4148,7 +4149,10 @@ read_func_scope (struct die_info *die, s
@@ -4169,7 +4170,10 @@ read_func_scope (struct die_info *die, s
add_to_cu_func_list (name, lowpc, highpc, cu);
new = push_context (0, lowpc);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03dec5c2840b0edb1cbca5ad2946327fab075e5c896f9afd830250fad3767a25
size 18139711

View File

@ -0,0 +1,965 @@
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.10874.2.11
retrieving revision 1.10874.2.12
diff -u -r1.10874.2.11 -r1.10874.2.12
--- src/gdb/ChangeLog 2009/09/19 16:36:08 1.10874.2.11
+++ src/gdb/ChangeLog 2009/09/21 06:57:02 1.10874.2.12
@@ -1,3 +1,47 @@
+2009-09-21 Hui Zhu <teawater@gmail.com>
+ Michael Snyder <msnyder@vmware.com>
+
+ * amd64-linux-tdep.c (amd64_all_but_ip_registers_record): New
+ function.
+ (amd64_linux_syscall_record): Call
+ amd64_all_but_ip_registers_record if syscall is
+ sys_rt_sigreturn.
+ (AMD64_LINUX_redzone, AMD64_LINUX_xstate,
+ AMD64_LINUX_frame_size): New macros.
+ (amd64_linux_record_signal): New function.
+ (amd64_linux_init_abi): Call set_gdbarch_process_record_signal.
+
+2009-09-21 Hui Zhu <teawater@gmail.com>
+ Michael Snyder <msnyder@vmware.com>
+
+ * i386-linux-tdep.c (i386_all_but_ip_registers_record): New
+ function.
+ (i386_linux_intx80_sysenter_record): Call
+ i386_all_but_ip_registers_record if syscall is sys_sigreturn
+ or sys_rt_sigreturn.
+ (I386_LINUX_xstate, I386_LINUX_frame_size): New macros.
+ (i386_linux_record_signal): New function.
+ (i386_linux_init_abi): Call set_gdbarch_process_record_signal.
+
+2009-09-21 Hui Zhu <teawater@gmail.com>
+ Michael Snyder <msnyder@vmware.com>
+
+ * record.c (record_end_entry): New struct.
+ (record_type): Add end.
+ (record_arch_list_add_end): Set rec->u.end.sigval to
+ TARGET_SIGNAL_0.
+ (record_message_args): New struct.
+ (record_message): Call gdbarch_process_record_signal.
+ (do_record_message): Add argument "signal".
+ (record_resume): Ditto.
+ (record_wait): Ditto. Check record_list->u.end.sigval
+ in replay mode.
+
+2009-09-21 Hui Zhu <teawater@gmail.com>
+ Michael Snyder <msnyder@vmware.com>
+
+ * gdbarch.sh (process_record_signal): New interface.
+
2009-09-19 Maxim Grigoriev <maxim2405@gmail.com>
* xtensa-tdep.c (call0_analyze_prologue): Replace INT_MAX by UNIT_MAX.
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.496
retrieving revision 1.496.2.1
diff -u -r1.496 -r1.496.2.1
--- src/gdb/gdbarch.sh 2009/09/15 03:30:05 1.496
+++ src/gdb/gdbarch.sh 2009/09/21 06:57:02 1.496.2.1
@@ -709,6 +709,10 @@
# Return -1 if something goes wrong, 0 otherwise.
M:int:process_record:struct regcache *regcache, CORE_ADDR addr:regcache, addr
+# Save process state after a signal.
+# Return -1 if something goes wrong, 0 otherwise.
+M:int:process_record_signal:struct regcache *regcache, enum target_signal signal:regcache, signal
+
# Signal translation: translate inferior's signal (host's) number into
# GDB's representation.
m:enum target_signal:target_signal_from_host:int signo:signo::default_target_signal_from_host::0
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.453
retrieving revision 1.453.2.1
diff -u -r1.453 -r1.453.2.1
--- src/gdb/gdbarch.c 2009/09/15 03:30:05 1.453
+++ src/gdb/gdbarch.c 2009/09/21 06:57:02 1.453.2.1
@@ -240,6 +240,7 @@
gdbarch_static_transform_name_ftype *static_transform_name;
int sofun_address_maybe_missing;
gdbarch_process_record_ftype *process_record;
+ gdbarch_process_record_signal_ftype *process_record_signal;
gdbarch_target_signal_from_host_ftype *target_signal_from_host;
gdbarch_target_signal_to_host_ftype *target_signal_to_host;
gdbarch_get_siginfo_type_ftype *get_siginfo_type;
@@ -378,6 +379,7 @@
0, /* static_transform_name */
0, /* sofun_address_maybe_missing */
0, /* process_record */
+ 0, /* process_record_signal */
default_target_signal_from_host, /* target_signal_from_host */
default_target_signal_to_host, /* target_signal_to_host */
0, /* get_siginfo_type */
@@ -635,6 +637,7 @@
/* Skip verify of static_transform_name, has predicate */
/* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
/* Skip verify of process_record, has predicate */
+ /* Skip verify of process_record_signal, has predicate */
/* Skip verify of target_signal_from_host, invalid_p == 0 */
/* Skip verify of target_signal_to_host, invalid_p == 0 */
/* Skip verify of get_siginfo_type, has predicate */
@@ -971,6 +974,12 @@
"gdbarch_dump: process_record = <%s>\n",
host_address_to_string (gdbarch->process_record));
fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
+ gdbarch_process_record_signal_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: process_record_signal = <%s>\n",
+ host_address_to_string (gdbarch->process_record_signal));
+ fprintf_unfiltered (file,
"gdbarch_dump: ps_regnum = %s\n",
plongest (gdbarch->ps_regnum));
fprintf_unfiltered (file,
@@ -3307,6 +3316,30 @@
gdbarch->process_record = process_record;
}
+int
+gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->process_record_signal != NULL;
+}
+
+int
+gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum target_signal signal)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->process_record_signal != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
+ return gdbarch->process_record_signal (gdbarch, regcache, signal);
+}
+
+void
+set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
+ gdbarch_process_record_signal_ftype process_record_signal)
+{
+ gdbarch->process_record_signal = process_record_signal;
+}
+
enum target_signal
gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
{
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.403
retrieving revision 1.403.2.1
diff -u -r1.403 -r1.403.2.1
--- src/gdb/gdbarch.h 2009/09/15 03:30:05 1.403
+++ src/gdb/gdbarch.h 2009/09/21 06:57:02 1.403.2.1
@@ -822,6 +822,15 @@
extern int gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr);
extern void set_gdbarch_process_record (struct gdbarch *gdbarch, gdbarch_process_record_ftype *process_record);
+/* Save process state after a signal.
+ Return -1 if something goes wrong, 0 otherwise. */
+
+extern int gdbarch_process_record_signal_p (struct gdbarch *gdbarch);
+
+typedef int (gdbarch_process_record_signal_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, enum target_signal signal);
+extern int gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum target_signal signal);
+extern void set_gdbarch_process_record_signal (struct gdbarch *gdbarch, gdbarch_process_record_signal_ftype *process_record_signal);
+
/* Signal translation: translate inferior's signal (host's) number into
GDB's representation. */
===================================================================
RCS file: /cvs/src/src/gdb/record.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- src/gdb/record.c 2009/09/08 00:50:42 1.17
+++ src/gdb/record.c 2009/09/21 06:57:03 1.17.2.1
@@ -59,6 +59,11 @@
gdb_byte *val;
};
+struct record_end_entry
+{
+ enum target_signal sigval;
+};
+
enum record_type
{
record_end = 0,
@@ -77,6 +82,8 @@
struct record_reg_entry reg;
/* mem */
struct record_mem_entry mem;
+ /* end */
+ struct record_end_entry end;
} u;
};
@@ -314,6 +321,7 @@
rec->prev = NULL;
rec->next = NULL;
rec->type = record_end;
+ rec->u.end.sigval = TARGET_SIGNAL_0;
record_arch_list_add (rec);
@@ -360,11 +368,17 @@
record_list_release (record_arch_list_tail);
}
+struct record_message_args {
+ struct regcache *regcache;
+ enum target_signal signal;
+};
+
static int
record_message (void *args)
{
int ret;
- struct regcache *regcache = args;
+ struct record_message_args *myargs = args;
+ struct gdbarch *gdbarch = get_regcache_arch (myargs->regcache);
struct cleanup *old_cleanups = make_cleanup (record_message_cleanups, 0);
record_arch_list_head = NULL;
@@ -373,9 +387,44 @@
/* Check record_insn_num. */
record_check_insn_num (1);
- ret = gdbarch_process_record (get_regcache_arch (regcache),
- regcache,
- regcache_read_pc (regcache));
+ /* If gdb sends a signal value to target_resume,
+ save it in the 'end' field of the previous instruction.
+
+ Maybe process record should record what really happened,
+ rather than what gdb pretends has happened.
+
+ So if Linux delivered the signal to the child process during
+ the record mode, we will record it and deliver it again in
+ the replay mode.
+
+ If user says "ignore this signal" during the record mode, then
+ it will be ignored again during the replay mode (no matter if
+ the user says something different, like "deliver this signal"
+ during the replay mode).
+
+ User should understand that nothing he does during the replay
+ mode will change the behavior of the child. If he tries,
+ then that is a user error.
+
+ But we should still deliver the signal to gdb during the replay,
+ if we delivered it during the recording. Therefore we should
+ record the signal during record_wait, not record_resume. */
+ if (record_list != &record_first) /* FIXME better way to check */
+ {
+ gdb_assert (record_list->type == record_end);
+ record_list->u.end.sigval = myargs->signal;
+ }
+
+ if (myargs->signal == TARGET_SIGNAL_0
+ || !gdbarch_process_record_signal_p (gdbarch))
+ ret = gdbarch_process_record (gdbarch,
+ myargs->regcache,
+ regcache_read_pc (myargs->regcache));
+ else
+ ret = gdbarch_process_record_signal (gdbarch,
+ myargs->regcache,
+ myargs->signal);
+
if (ret > 0)
error (_("Process record: inferior program stopped."));
if (ret < 0)
@@ -396,9 +445,14 @@
}
static int
-do_record_message (struct regcache *regcache)
+do_record_message (struct regcache *regcache,
+ enum target_signal signal)
{
- return catch_errors (record_message, regcache, NULL, RETURN_MASK_ALL);
+ struct record_message_args args;
+
+ args.regcache = regcache;
+ args.signal = signal;
+ return catch_errors (record_message, &args, NULL, RETURN_MASK_ALL);
}
/* Set to 1 if record_store_registers and record_xfer_partial
@@ -520,13 +574,13 @@
static void
record_resume (struct target_ops *ops, ptid_t ptid, int step,
- enum target_signal siggnal)
+ enum target_signal signal)
{
record_resume_step = step;
if (!RECORD_IS_REPLAY)
{
- if (do_record_message (get_current_regcache ()))
+ if (do_record_message (get_current_regcache (), signal))
{
record_resume_error = 0;
}
@@ -536,7 +590,7 @@
return;
}
record_beneath_to_resume (record_beneath_to_resume_ops, ptid, 1,
- siggnal);
+ signal);
}
}
@@ -611,15 +665,16 @@
ret = record_beneath_to_wait (record_beneath_to_wait_ops,
ptid, status, options);
+ /* Is this a SIGTRAP? */
if (status->kind == TARGET_WAITKIND_STOPPED
&& status->value.sig == TARGET_SIGNAL_TRAP)
{
- /* Check if there is a breakpoint. */
+ /* Yes -- check if there is a breakpoint. */
registers_changed ();
tmp_pc = regcache_read_pc (get_current_regcache ());
if (breakpoint_inserted_here_p (tmp_pc))
{
- /* There is a breakpoint. */
+ /* There is a breakpoint. GDB will want to stop. */
CORE_ADDR decr_pc_after_break =
gdbarch_decr_pc_after_break
(get_regcache_arch (get_current_regcache ()));
@@ -631,8 +686,12 @@
}
else
{
- /* There is not a breakpoint. */
- if (!do_record_message (get_current_regcache ()))
+ /* There is not a breakpoint, and gdb is not
+ stepping, therefore gdb will not stop.
+ Therefore we will not return to gdb.
+ Record the insn and resume. */
+ if (!do_record_message (get_current_regcache (),
+ TARGET_SIGNAL_0))
{
break;
}
@@ -827,6 +886,10 @@
gdbarch_decr_pc_after_break (gdbarch));
continue_flag = 0;
}
+ /* Check target signal */
+ if (record_list->u.end.sigval != TARGET_SIGNAL_0)
+ /* FIXME: better way to check */
+ continue_flag = 0;
}
}
@@ -851,6 +914,9 @@
replay_out:
if (record_get_sig)
status->value.sig = TARGET_SIGNAL_INT;
+ else if (record_list->u.end.sigval != TARGET_SIGNAL_0)
+ /* FIXME: better way to check */
+ status->value.sig = record_list->u.end.sigval;
else
status->value.sig = TARGET_SIGNAL_TRAP;
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.68
retrieving revision 1.68.2.1
diff -u -r1.68 -r1.68.2.1
--- src/gdb/i386-linux-tdep.c 2009/09/15 03:30:06 1.68
+++ src/gdb/i386-linux-tdep.c 2009/09/21 06:57:03 1.68.2.1
@@ -358,7 +358,32 @@
regcache_cooked_write_unsigned (regcache, I386_LINUX_ORIG_EAX_REGNUM, -1);
}
-static struct linux_record_tdep i386_linux_record_tdep;
+/* Record all registers but IP register for process-record. */
+
+static int
+i386_all_but_ip_registers_record (struct regcache *regcache)
+{
+ if (record_arch_list_add_reg (regcache, I386_EAX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_ECX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_EDX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_EBX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_ESP_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_EBP_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_ESI_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_EDI_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, I386_EFLAGS_REGNUM))
+ return -1;
+
+ return 0;
+}
/* i386_canonicalize_syscall maps from the native i386 Linux set
of syscall ids into a canonical set of syscall ids used by
@@ -383,6 +408,8 @@
Return -1 if something wrong. */
+static struct linux_record_tdep i386_linux_record_tdep;
+
static int
i386_linux_intx80_sysenter_record (struct regcache *regcache)
{
@@ -402,6 +429,14 @@
return -1;
}
+ if (syscall_gdb == gdb_sys_sigreturn
+ || syscall_gdb == gdb_sys_rt_sigreturn)
+ {
+ if (i386_all_but_ip_registers_record (regcache))
+ return -1;
+ return 0;
+ }
+
ret = record_linux_system_call (syscall_gdb, regcache,
&i386_linux_record_tdep);
if (ret)
@@ -413,6 +448,40 @@
return 0;
}
+
+#define I386_LINUX_xstate 270
+#define I386_LINUX_frame_size 732
+
+int
+i386_linux_record_signal (struct gdbarch *gdbarch,
+ struct regcache *regcache,
+ enum target_signal signal)
+{
+ ULONGEST esp;
+
+ if (i386_all_but_ip_registers_record (regcache))
+ return -1;
+
+ if (record_arch_list_add_reg (regcache, I386_EIP_REGNUM))
+ return -1;
+
+ /* Record the change in the stack. */
+ regcache_raw_read_unsigned (regcache, I386_ESP_REGNUM, &esp);
+ /* This is for xstate.
+ sp -= sizeof (struct _fpstate); */
+ esp -= I386_LINUX_xstate;
+ /* This is for frame_size.
+ sp -= sizeof (struct rt_sigframe); */
+ esp -= I386_LINUX_frame_size;
+ if (record_arch_list_add_mem (esp,
+ I386_LINUX_xstate + I386_LINUX_frame_size))
+ return -1;
+
+ if (record_arch_list_add_end ())
+ return -1;
+
+ return 0;
+}
static LONGEST
@@ -529,6 +598,7 @@
tdep->sc_num_regs = ARRAY_SIZE (i386_linux_sc_reg_offset);
set_gdbarch_process_record (gdbarch, i386_process_record);
+ set_gdbarch_process_record_signal (gdbarch, i386_linux_record_signal);
/* Initialize the i386_linux_record_tdep. */
/* These values are the size of the type that will be used in a system
===================================================================
RCS file: /cvs/src/src/gdb/amd64-linux-tdep.c,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -r1.29 -r1.29.2.1
--- src/gdb/amd64-linux-tdep.c 2009/09/15 03:30:04 1.29
+++ src/gdb/amd64-linux-tdep.c 2009/09/21 06:57:03 1.29.2.1
@@ -289,16 +289,48 @@
regcache_cooked_write_unsigned (regcache, AMD64_LINUX_ORIG_RAX_REGNUM, -1);
}
-/* Parse the arguments of current system call instruction and record
- the values of the registers and memory that will be changed into
- "record_arch_list". This instruction is "syscall".
-
- Return -1 if something wrong. */
+/* Record all registers but IP register for process-record. */
-static struct linux_record_tdep amd64_linux_record_tdep;
+static int
+amd64_all_but_ip_registers_record (struct regcache *regcache)
+{
+ if (record_arch_list_add_reg (regcache, AMD64_RAX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RCX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RDX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RBX_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RSP_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RBP_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RSI_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_RDI_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R8_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R9_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R10_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R11_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R12_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R13_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R14_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_R15_REGNUM))
+ return -1;
+ if (record_arch_list_add_reg (regcache, AMD64_EFLAGS_REGNUM))
+ return -1;
-#define RECORD_ARCH_GET_FS 0x1003
-#define RECORD_ARCH_GET_GS 0x1004
+ return 0;
+}
/* amd64_canonicalize_syscall maps from the native amd64 Linux set
of syscall ids into a canonical set of syscall ids used by
@@ -1111,6 +1143,17 @@
}
}
+/* Parse the arguments of current system call instruction and record
+ the values of the registers and memory that will be changed into
+ "record_arch_list". This instruction is "syscall".
+
+ Return -1 if something wrong. */
+
+static struct linux_record_tdep amd64_linux_record_tdep;
+
+#define RECORD_ARCH_GET_FS 0x1003
+#define RECORD_ARCH_GET_GS 0x1004
+
static int
amd64_linux_syscall_record (struct regcache *regcache)
{
@@ -1120,27 +1163,39 @@
regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &syscall_native);
- syscall_gdb = amd64_canonicalize_syscall (syscall_native);
-
- if (syscall_native == amd64_sys_arch_prctl)
+ switch (syscall_native)
{
- ULONGEST arg3;
-
- regcache_raw_read_unsigned (regcache, amd64_linux_record_tdep.arg3,
- &arg3);
- if (arg3 == RECORD_ARCH_GET_FS || arg3 == RECORD_ARCH_GET_GS)
- {
- CORE_ADDR addr;
-
- regcache_raw_read_unsigned (regcache, amd64_linux_record_tdep.arg2,
- &addr);
- if (record_arch_list_add_mem (addr,
- amd64_linux_record_tdep.size_ulong))
- return -1;
- }
- goto record_regs;
+ case amd64_sys_rt_sigreturn:
+ if (amd64_all_but_ip_registers_record (regcache))
+ return -1;
+ return 0;
+ break;
+
+ case amd64_sys_arch_prctl:
+ if (syscall_native == amd64_sys_arch_prctl)
+ {
+ ULONGEST arg3;
+
+ regcache_raw_read_unsigned (regcache, amd64_linux_record_tdep.arg3,
+ &arg3);
+ if (arg3 == RECORD_ARCH_GET_FS || arg3 == RECORD_ARCH_GET_GS)
+ {
+ CORE_ADDR addr;
+
+ regcache_raw_read_unsigned (regcache,
+ amd64_linux_record_tdep.arg2,
+ &addr);
+ if (record_arch_list_add_mem (addr,
+ amd64_linux_record_tdep.size_ulong))
+ return -1;
+ }
+ goto record_regs;
+ }
+ break;
}
+ syscall_gdb = amd64_canonicalize_syscall (syscall_native);
+
if (syscall_gdb < 0)
{
printf_unfiltered (_("Process record and replay target doesn't "
@@ -1163,6 +1218,44 @@
if (record_arch_list_add_reg (regcache, AMD64_R11_REGNUM))
return -1;
+ return 0;
+}
+
+#define AMD64_LINUX_redzone 128
+#define AMD64_LINUX_xstate 512
+#define AMD64_LINUX_frame_size 560
+
+int
+amd64_linux_record_signal (struct gdbarch *gdbarch,
+ struct regcache *regcache,
+ enum target_signal signal)
+{
+ ULONGEST rsp;
+
+ if (amd64_all_but_ip_registers_record (regcache))
+ return -1;
+
+ if (record_arch_list_add_reg (regcache, AMD64_RIP_REGNUM))
+ return -1;
+
+ /* Record the change in the stack. */
+ regcache_raw_read_unsigned (regcache, AMD64_RSP_REGNUM, &rsp);
+ /* redzone
+ sp -= 128; */
+ rsp -= AMD64_LINUX_redzone;
+ /* This is for xstate.
+ sp -= sizeof (struct _fpstate); */
+ rsp -= AMD64_LINUX_xstate;
+ /* This is for frame_size.
+ sp -= sizeof (struct rt_sigframe); */
+ rsp -= AMD64_LINUX_frame_size;
+ if (record_arch_list_add_mem (rsp, AMD64_LINUX_redzone
+ + AMD64_LINUX_xstate
+ + AMD64_LINUX_frame_size))
+ return -1;
+
+ if (record_arch_list_add_end ())
+ return -1;
return 0;
}
@@ -1218,6 +1311,7 @@
set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);
set_gdbarch_process_record (gdbarch, i386_process_record);
+ set_gdbarch_process_record_signal (gdbarch, amd64_linux_record_signal);
/* Initialize the amd64_linux_record_tdep. */
/* These values are the size of the type that will be used in a system
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.10874.2.12
retrieving revision 1.10874.2.13
diff -u -r1.10874.2.12 -r1.10874.2.13
--- src/gdb/ChangeLog 2009/09/21 06:57:02 1.10874.2.12
+++ src/gdb/ChangeLog 2009/09/21 10:19:59 1.10874.2.13
@@ -1,3 +1,8 @@
+2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+
+ * python/py-value.c (valpy_getitem): Test value before allowing
+ subscript operation.
+
2009-09-21 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>
===================================================================
RCS file: /cvs/src/src/gdb/python/py-value.c,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- src/gdb/python/py-value.c 2009/09/09 17:45:40 1.1
+++ src/gdb/python/py-value.c 2009/09/21 10:20:00 1.1.2.1
@@ -324,7 +324,18 @@
type. */
struct value *idx = convert_value_from_python (key);
if (idx != NULL)
- res_val = value_subscript (tmp, value_as_long (idx));
+ {
+ /* Check the value's type is something that can be accessed via
+ a subscript. */
+ struct type *type;
+ tmp = coerce_ref (tmp);
+ type = check_typedef (value_type (tmp));
+ if (TYPE_CODE (type) != TYPE_CODE_ARRAY
+ && TYPE_CODE (type) != TYPE_CODE_PTR)
+ error( _("Cannot subscript requested type"));
+ else
+ res_val = value_subscript (tmp, value_as_long (idx));
+ }
}
}
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1960
retrieving revision 1.1960.2.1
diff -u -r1.1960 -r1.1960.2.1
--- src/gdb/testsuite/ChangeLog 2009/09/15 18:51:25 1.1960
+++ src/gdb/testsuite/ChangeLog 2009/09/21 10:20:00 1.1960.2.1
@@ -1,3 +1,10 @@
+2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+
+ * gdb.python/py-value.exp (test_subscript_regression): New
+ function. Test for invalid subscripts.
+ * gdb.python/py-value.c (main): Add test array, and pointer to it.
+ (ptr_ref): New function.
+
2009-09-15 Tom Tromey <tromey@redhat.com>
* lib/mi-support.exp (mi_create_varobj): Update.
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-value.c,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- src/gdb/testsuite/gdb.python/py-value.c 2009/09/09 17:45:42 1.1
+++ src/gdb/testsuite/gdb.python/py-value.c 2009/09/21 10:20:00 1.1.2.1
@@ -37,6 +37,13 @@
enum e evalue = TWO;
+#ifdef __cplusplus
+void ptr_ref(int*& rptr_int)
+{
+ return; /* break to inspect pointer by reference. */
+}
+#endif
+
int
main (int argc, char *argv[])
{
@@ -46,10 +53,18 @@
PTR x = &s;
char st[17] = "divide et impera";
char nullst[17] = "divide\0et\0impera";
+ int a[3] = {1,2,3};
+ int *p = a;
+ int i = 2;
+ int *ptr_i = &i;
s.a = 3;
s.b = 5;
u.a = 7;
+#ifdef __cplusplus
+ ptr_ref(ptr_i);
+#endif
+
return 0; /* break to inspect struct and union */
}
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-value.exp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- src/gdb/testsuite/gdb.python/py-value.exp 2009/09/09 17:45:42 1.1
+++ src/gdb/testsuite/gdb.python/py-value.exp 2009/09/21 10:20:00 1.1.2.1
@@ -292,6 +292,75 @@
"print value's type"
}
+# Regression test for invalid subscript operations. The bug was that
+# the type of the value was not being checked before allowing a
+# subscript operation to proceed.
+
+proc test_subscript_regression {lang} {
+
+ global srcdir subdir srcfile binfile testfile hex
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } {
+ untested "Couldn't compile ${srcfile} in $lang mode"
+ return -1
+ }
+
+ # Start with a fresh gdb.
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ if ![runto_main ] then {
+ perror "couldn't run to breakpoint"
+ return
+ }
+
+ if {$lang == "c++"} {
+ gdb_breakpoint [gdb_get_line_number "break to inspect pointer by reference"]
+ gdb_continue_to_breakpoint "break to inspect pointer by reference"
+
+ gdb_py_test_silent_cmd "print rptr_int" \
+ "Obtain address" 1
+ gdb_py_test_silent_cmd "python rptr = gdb.history(0)" \
+ "Obtains value from GDB" 1
+ gdb_test "python print rptr\[0\]" "2" "Check pointer passed as reference"
+ }
+
+ gdb_breakpoint [gdb_get_line_number "break to inspect struct and union"]
+ gdb_continue_to_breakpoint "break to inspect struct and union"
+
+ gdb_py_test_silent_cmd "python intv = gdb.Value(1)" \
+ "Create a value for subscript test" 1
+ gdb_py_test_silent_cmd "python stringv = gdb.Value(\"foo\")" \
+ "Create a value for subscript test" 1
+
+ # Try to access an int with a subscript. This should fail.
+ gdb_test "python print intv" "1" "Baseline print of a Python value"
+ gdb_test "python print intv\[0\]" "RuntimeError: Cannot subscript requested type.*" \
+ "Attempt to access an integer with a subscript"
+
+ # Try to access a string with a subscript. This should pass.
+ gdb_test "python print stringv" "foo." "Baseline print of a Python value"
+ gdb_test "python print stringv\[0\]" "f." "Attempt to access a string with a subscript"
+
+ # Try to access an int array via a pointer with a subscript. This should pass.
+ gdb_py_test_silent_cmd "print p" "Build pointer to array" 1
+ gdb_py_test_silent_cmd "python pointer = gdb.history(0)" "" 1
+ gdb_test "python print pointer\[0\]" "1" "Access array via pointer with int subscript"
+ gdb_test "python print pointer\[intv\]" "2" "Access array via pointer with value subscript"
+
+ # Try to access a single dimension array with a subscript to the
+ # result. This should fail.
+ gdb_test "python print pointer\[intv\]\[0\]" "RuntimeError: Cannot subscript requested type.*" \
+ "Attempt to access an integer with a subscript"
+
+ # Lastly, test subscript access to an array with multiple
+ # dimensions. This should pass.
+ gdb_py_test_silent_cmd "print {\"fu \",\"foo\",\"bar\"}" "Build array" 1
+ gdb_py_test_silent_cmd "python marray = gdb.history(0)" "" 1
+ gdb_test "python print marray\[1\]\[2\]" "o." "Test multiple subscript"
+}
+
# Start with a fresh gdb.
gdb_exit
@@ -322,3 +391,8 @@
test_value_in_inferior
test_value_after_death
+
+# The following test recompiles the binary to test either C or C++
+# values.
+test_subscript_regression "c++"
+test_subscript_regression "c"
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.10874.2.13
retrieving revision 1.10874.2.14
diff -u -r1.10874.2.13 -r1.10874.2.14
--- src/gdb/ChangeLog 2009/09/21 10:19:59 1.10874.2.13
+++ src/gdb/ChangeLog 2009/09/21 10:25:29 1.10874.2.14
@@ -1,5 +1,12 @@
2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+ PR python/10633
+
+ * c-lang.c (c_printstr): Do not loop past options->print_max when
+ iterating with wchar_iterate.
+
+2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+
* python/py-value.c (valpy_getitem): Test value before allowing
subscript operation.
===================================================================
RCS file: /cvs/src/src/gdb/c-lang.c,v
retrieving revision 1.75
retrieving revision 1.75.4.1
diff -u -r1.75 -r1.75.4.1
--- src/gdb/c-lang.c 2009/07/10 10:35:16 1.75
+++ src/gdb/c-lang.c 2009/09/21 10:25:29 1.75.4.1
@@ -459,7 +459,7 @@
single character in isolation. This makes the code simpler
and probably does the sensible thing in the majority of
cases. */
- while (num_chars == 1)
+ while (num_chars == 1 && things_printed < options->print_max)
{
/* Count the number of repetitions. */
unsigned int reps = 0;
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1960.2.1
retrieving revision 1.1960.2.2
diff -u -r1.1960.2.1 -r1.1960.2.2
--- src/gdb/testsuite/ChangeLog 2009/09/21 10:20:00 1.1960.2.1
+++ src/gdb/testsuite/ChangeLog 2009/09/21 10:25:29 1.1960.2.2
@@ -1,5 +1,13 @@
2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+ PR python/10633
+
+ * gdb.python/py-prettyprint.exp (gdb_py_test_silent_cmd): New
+ Function.
+ (run_lang_tests): Add print elements test.
+
+2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
+
* gdb.python/py-value.exp (test_subscript_regression): New
function. Test for invalid subscripts.
* gdb.python/py-value.c (main): Add test array, and pointer to it.
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-prettyprint.exp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- src/gdb/testsuite/gdb.python/py-prettyprint.exp 2009/09/09 17:45:42 1.1
+++ src/gdb/testsuite/gdb.python/py-prettyprint.exp 2009/09/21 10:25:30 1.1.2.1
@@ -35,6 +35,17 @@
-re "$gdb_prompt $" {}
}
+# Run a command in GDB, and report a failure if a Python exception is thrown.
+# If report_pass is true, report a pass if no exception is thrown.
+proc gdb_py_test_silent_cmd {cmd name report_pass} {
+ global gdb_prompt
+
+ gdb_test_multiple $cmd $name {
+ -re "Traceback.*$gdb_prompt $" { fail $name }
+ -re "$gdb_prompt $" { if $report_pass { pass $name } }
+ }
+}
+
proc run_lang_tests {lang} {
global srcdir subdir srcfile binfile testfile hex
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } {
@@ -79,6 +90,11 @@
gdb_test "print derived" \
" = \{.*<Vbase1> = pp class name: Vbase1.*<Vbase2> = \{.*<VirtualTest> = pp value variable is: 1,.*members of Vbase2:.*_vptr.Vbase2 = $hex.*<Vbase3> = \{.*members of Vbase3.*members of Derived:.*value = 2.*"
gdb_test "print ns " "\"embedded\\\\000null\\\\000string\""
+ gdb_py_test_silent_cmd "set print elements 3" "" 1
+ gdb_test "print ns" "emb\.\.\.."
+ gdb_py_test_silent_cmd "set print elements 10" "" 1
+ gdb_test "print ns" "embedded\\\\000n\.\.\.."
+ gdb_py_test_silent_cmd "set print elements 200" "" 1
}
gdb_test "print x" " = $hex \"this is x\""

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e4584a07edf7b86c65a0a4a435455aff464d20611dbc388de95b3fc2faaa8c7c
size 18453563

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,11 @@ gdb/
* config.in: Regenerate.
* configure: Regenerate.
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -536,6 +536,21 @@ if test "$with_system_readline" = yes; then
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=
@ -31,9 +33,11 @@ gdb/
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -790,6 +790,9 @@
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
@ -43,9 +47,11 @@ gdb/
/* 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. */
--- a/gdb/configure
+++ b/gdb/configure
@@ -10763,6 +10763,69 @@ if test "$with_system_readline" = yes; then
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=

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Thu Sep 24 11:40:44 CEST 2009 - rguenther@suse.de
- Merge from gdb-6.8.91.20090921-1.fc12.src.rpm.
-------------------------------------------------------------------
Mon Sep 14 14:29:20 CEST 2009 - rguenther@suse.de
- Merge from gdb-6.8.50.20090910-1.fc12.src.rpm.
-------------------------------------------------------------------
Mon Aug 24 17:30:30 CEST 2009 - rguenther@suse.de
- Fix gdb-6.3-ia64-sigtramp-frame-20050708.patch patch to allow
ia64 to build again.
-------------------------------------------------------------------
Mon Aug 24 14:07:52 CEST 2009 - rguenther@suse.de
- Merge from gdb-6.8.50.20090818-4.fc12.src.rpm.
-------------------------------------------------------------------
Mon Aug 17 14:04:46 CEST 2009 - rguenther@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package gdb (Version 6.8.50.20090811)
# spec file for package gdb (Version 6.8.91.20090921)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -22,13 +22,13 @@ Name: gdb
# Set version to contents of gdb/version.in.
# 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).
Version: 6.8.50.20090811
Version: 6.8.91.20090921
Release: 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.
License: GPLv3+
Group: Development/Debuggers
Source: ftp://sourceware.org/pub/gdb/snapshots/current/gdb-%{version}.tar.bz2
Source: ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://gnu.org/software/gdb/
# For our convenience
@ -51,6 +51,9 @@ Obsoletes: gdb64 < 5.3.91
Source2: gdb-orphanripper.c
# Man page for gstack(1).
Source3: gdb-gstack.man
# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
%define libstdcxxpython libstdc++-v3-python-r151798
Source4: %{libstdcxxpython}.tar.bz2
# Work around out-of-date dejagnu that does not have KFAIL
Patch1: gdb-6.3-rh-dummykfail-20041202.patch
# Match the Fedora's version info.
@ -88,6 +91,7 @@ Patch136: gdb-6.3-test-movedir-20050125.patch
# Fix gcore for threads
Patch140: gdb-6.3-gcore-thread-20050204.patch
# Stop while intentionally stepping and the thread exit is met.
Patch141: gdb-6.6-step-thread-exit.patch
Patch259: gdb-6.3-step-thread-exit-20050211-test.patch
# Prevent gdb from being pushed into background
Patch142: gdb-6.3-terminal-fix-20050214.patch
@ -114,8 +118,6 @@ Patch162: gdb-6.3-ia64-info-frame-fix-20050725.patch
Patch163: gdb-6.3-inheritancetest-20050726.patch
# Add readnever option
Patch164: gdb-6.3-readnever-20050907.patch
# Fix frame pointer for ia64 sigtramp frame
Patch166: gdb-6.3-ia64-sigtramp-fp-20050926.patch
# Fix ia64 gdb problem with user-specified SIGILL handling
Patch169: gdb-6.3-ia64-sigill-20051115.patch
# Allow option to continue backtracing past a zero pc value
@ -161,6 +163,8 @@ Patch225: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
Patch229: gdb-6.3-bz140532-ppc-unwinding-test.patch
# Testcase for exec() from threaded program (BZ 202689).
Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported post gdb-6.8.50.20090991 snapshot fixups.
Patch232: gdb-6.8.50.20090921-upstream.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
# Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832)
@ -191,10 +195,6 @@ Patch271: gdb-6.5-bz243845-stale-testing-zombie-test.patch
# New locating of the matching binaries from the pure core file (build-id).
Patch274: gdb-6.6-buildid-locate.patch
Patch353: gdb-6.6-buildid-locate-rpm.patch
# Fix hardware watchpoints after inferior forks-off some process.
# Threaded `set follow-fork-mode child' still not fixed there, glibc fixes reqd.
# `set detach-on-fork off' not fixed there in general - it already assert-fails.
Patch280: gdb-6.6-multifork-debugreg.patch
# Fix displaying of numeric char arrays as strings (BZ 224128).
Patch282: gdb-6.7-charsign-test.patch
# Test PPC hiding of call-volatile parameter register.
@ -260,6 +260,8 @@ Patch352: gdb-6.8-bz457187-largefile.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.
Patch376: libstdc++-v3-python-common-prefix.patch
# Fix readline 5.1 warnings
Patch1000: readline-5.1-random.patch
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
@ -277,6 +279,8 @@ BuildRequires: rpm-devel
%if 0%{!?_without_python:1}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildRequires: python-devel
# Temporarily before it gets moved to libstdc++.rpm
BuildRequires: libstdc++
%endif # 0%{!?_without_python:1}
%if 0%{?_with_testsuite:1}
BuildRequires: dejagnu sharutils
@ -326,6 +330,8 @@ This package provides a program that allows you to run GDB on a different machin
# This allows the tarball name to be different from our
# version-release name.
%setup -q -n %{gdb_src}
# libstdc++ pretty printers.
bzip2 -dc %{SOURCE4} | tar xf -
# Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
@ -333,6 +339,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
# Match the Fedora's version info.
%patch2 -p1
%if 0%{!?_with_upstream:1}
%patch232 -p1
%patch349 -p1
%patch1 -p1
%patch3 -p1
@ -348,6 +355,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch133 -p1
%patch136 -p1
%patch140 -p1
%patch141 -p1
%patch259 -p1
%patch142 -p1
%patch145 -p1
@ -362,7 +370,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch162 -p1
%patch163 -p1
%patch164 -p1
%patch166 -p1
%patch169 -p1
%patch170 -p1
%patch176 -p1
@ -401,7 +408,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch271 -p1
%patch274 -p1
%patch353 -p1
%patch280 -p1
%patch282 -p1
%patch284 -p1
%patch287 -p1
@ -434,6 +440,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch352 -p1
%patch360 -p1
%patch375 -p1
%patch376 -p1
%patch124 -p1
%patch1000
%patch1002 -p1
@ -613,6 +620,21 @@ test -x $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
%if 0%{!?_without_python:1}
# Temporarily now:
for LIB in lib lib64;do
LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
mkdir -p $LIBPATH
# basename is being run only for the native (non-biarch) file.
sed -e 's,@pythondir@,%{python_sitelib}/gdb,' \
-e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
< $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \
> $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
done
test ! -e $RPM_BUILD_ROOT%{python_sitelib}/gdb/libstdcxx
cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx \
$RPM_BUILD_ROOT%{python_sitelib}/gdb/libstdcxx
%endif # 0%{!?_without_python:1}
# Remove the files that are part of a gdb build but that are owned and
# provided by other packages.
# These are part of binutils
@ -665,6 +687,7 @@ fi
%{python_sitelib}/gdb
%endif # 0%{!?_without_python:1}
%endif # 0%{!?_with_upstream:1}
%{_datadir}/gdb
%{_infodir}/annotate.info*
%{_infodir}/gdb.info*
%{_infodir}/gdbint.info*

View File

@ -0,0 +1,18 @@
On x86_64 host with:
pythondir: /usr/lib/python2.6/site-packages/gdb
libdir: /usr/lib64
prefix got set to "/usr/lib" but the code expects a trailing "/" (missing then
one "../" path component).
--- ./libstdc++-v3-python-r151798/hook.in-orig 2009-06-18 21:12:37.000000000 +0200
+++ ./libstdc++-v3-python-r151798/hook.in 2009-09-17 23:37:35.000000000 +0200
@@ -40,7 +40,7 @@ if gdb.current_objfile () is not None:
# In some bizarre configuration we might have found a match in the
# middle of a directory name.
if prefix[-1] != '/':
- prefix = os.path.dirname (prefix)
+ prefix = os.path.dirname (prefix) + '/'
# Strip off the prefix.
pythondir = pythondir[len (prefix):]

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3fc7a531f1fdb64a48fc92262b219b31575e2726b4f4d4768b7b947c4032785a
size 10953