Rebase to FSF GDB 7.4.50.20120714.

- Fix entryval feature crash on some .debug files optimized by dwz (BZ 839596).
- Fix another stale frame_info * (PR 11914, like PR 13866).
This commit is contained in:
Jan Kratochvil 2012-07-15 10:41:46 +02:00
parent 642e08f465
commit 8aabf36e77
13 changed files with 695 additions and 782 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/libstdc++-v3-python-r155978.tar.bz2 /libstdc++-v3-python-r155978.tar.bz2
/gdb-7.4.50.20120703.tar.bz2 /gdb-7.4.50.20120714.tar.bz2

View File

@ -21,10 +21,10 @@
Port to GDB-6.8pre. Port to GDB-6.8pre.
Index: gdb-7.4.50.20120602/gdb/inferior.h Index: gdb-7.4.50.20120714/gdb/inferior.h
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/inferior.h 2012-05-24 18:39:09.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/inferior.h 2012-06-13 20:15:05.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/inferior.h 2012-06-02 18:24:12.875274179 +0200 +++ gdb-7.4.50.20120714/gdb/inferior.h 2012-07-14 23:21:01.795161794 +0200
@@ -159,7 +159,15 @@ extern void reopen_exec_file (void); @@ -159,7 +159,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances. /* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */ Normally, use `proceed', which handles a lot of bookkeeping. */
@ -42,10 +42,10 @@ Index: gdb-7.4.50.20120602/gdb/inferior.h
extern ptid_t user_visible_resume_ptid (int step); extern ptid_t user_visible_resume_ptid (int step);
Index: gdb-7.4.50.20120602/gdb/infrun.c Index: gdb-7.4.50.20120714/gdb/infrun.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/infrun.c 2012-05-28 22:43:26.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/infrun.c 2012-07-01 12:37:04.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/infrun.c 2012-06-02 18:23:59.339278268 +0200 +++ gdb-7.4.50.20120714/gdb/infrun.c 2012-07-14 23:21:01.800161767 +0200
@@ -79,7 +79,7 @@ static int follow_fork (void); @@ -79,7 +79,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty, static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c); struct cmd_list_element *c);
@ -55,7 +55,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
static int currently_stepping_or_nexting_callback (struct thread_info *tp, static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data); void *data);
@@ -1687,7 +1687,8 @@ user_visible_resume_ptid (int step) @@ -1672,7 +1672,8 @@ user_visible_resume_ptid (int step)
} }
else if ((scheduler_mode == schedlock_on) else if ((scheduler_mode == schedlock_on)
|| (scheduler_mode == schedlock_step || (scheduler_mode == schedlock_step
@ -65,7 +65,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
{ {
/* User-settable 'scheduler' mode requires solo thread resume. */ /* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid; resume_ptid = inferior_ptid;
@@ -1705,7 +1706,7 @@ user_visible_resume_ptid (int step) @@ -1690,7 +1691,7 @@ user_visible_resume_ptid (int step)
STEP nonzero if we should step (zero to continue instead). STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */ SIG is the signal to give the inferior (zero for none). */
void void
@ -74,7 +74,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
{ {
int should_resume = 1; int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1738,9 +1739,13 @@ resume (int step, enum gdb_signal sig) @@ -1723,9 +1724,13 @@ resume (int step, enum gdb_signal sig)
if (debug_infrun) if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
@ -90,7 +90,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
target_pid_to_str (inferior_ptid), target_pid_to_str (inferior_ptid),
paddress (gdbarch, pc)); paddress (gdbarch, pc));
@@ -2117,7 +2122,7 @@ proceed (CORE_ADDR addr, enum gdb_signal @@ -2102,7 +2107,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
struct thread_info *tp; struct thread_info *tp;
CORE_ADDR pc; CORE_ADDR pc;
struct address_space *aspace; struct address_space *aspace;
@ -99,7 +99,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
/* If we're stopped at a fork/vfork, follow the branch set by the /* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed "set follow-fork-mode" command; otherwise, we'll just proceed
@@ -2157,13 +2162,13 @@ proceed (CORE_ADDR addr, enum gdb_signal @@ -2142,13 +2147,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
actually be executing the breakpoint insn anyway. actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */ We'll be (un-)executing the previous instruction. */
@ -115,7 +115,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
} }
else else
{ {
@@ -2194,13 +2199,13 @@ proceed (CORE_ADDR addr, enum gdb_signal @@ -2179,13 +2184,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
is required it returns TRUE and sets the current thread to is required it returns TRUE and sets the current thread to
the old thread. */ the old thread. */
if (prepare_to_proceed (step)) if (prepare_to_proceed (step))
@ -131,7 +131,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
{ {
tp->control.trap_expected = 1; tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the /* If displaced stepping is enabled, we can step over the
@@ -2287,8 +2292,13 @@ proceed (CORE_ADDR addr, enum gdb_signal @@ -2272,8 +2277,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
/* Reset to normal state. */ /* Reset to normal state. */
init_infwait_state (); init_infwait_state ();
@ -146,7 +146,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
/* Wait for it to stop (if not standalone) /* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */ and in any case decode why it stopped, and act accordingly. */
@@ -5249,13 +5259,18 @@ process_event_stop_test: @@ -5205,13 +5215,18 @@ process_event_stop_test:
/* Is thread TP in the middle of single-stepping? */ /* Is thread TP in the middle of single-stepping? */
@ -170,11 +170,11 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
} }
/* Returns true if any thread *but* the one passed in "data" is in the /* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-7.4.50.20120602/gdb/linux-nat.c Index: gdb-7.4.50.20120714/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-05-24 18:51:34.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/linux-nat.c 2012-07-07 14:13:56.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 18:23:07.409293800 +0200 +++ gdb-7.4.50.20120714/gdb/linux-nat.c 2012-07-14 23:21:01.803161750 +0200
@@ -3051,7 +3051,11 @@ static int @@ -2982,7 +2982,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data) select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{ {
if (lp->last_resume_kind == resume_step if (lp->last_resume_kind == resume_step
@ -187,10 +187,10 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.c
return 1; return 1;
else else
return 0; return 0;
Index: gdb-7.4.50.20120602/gdb/linux-nat.h Index: gdb-7.4.50.20120714/gdb/linux-nat.h
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.h 2012-03-21 14:43:54.000000000 +0100 --- gdb-7.4.50.20120714.orig/gdb/linux-nat.h 2012-07-06 18:52:20.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/linux-nat.h 2012-06-02 18:23:07.411293798 +0200 +++ gdb-7.4.50.20120714/gdb/linux-nat.h 2012-07-14 23:21:17.414075355 +0200
@@ -73,8 +73,8 @@ struct lwp_info @@ -73,8 +73,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */ /* If non-zero, a pending wait status. */
int status; int status;
@ -200,5 +200,5 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.h
+ /* The kind of stepping of this LWP. */ + /* The kind of stepping of this LWP. */
+ enum resume_step step; + enum resume_step step;
/* Non-zero si_signo if this LWP stopped with a trap. si_addr may /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
be the address of a hardware watchpoint. */ watchpoint trap. */

File diff suppressed because it is too large Load Diff

View File

@ -37,13 +37,13 @@ gdb/gdbserver/
(linux_create_inferior, linux_tracefork_child): Call it instead of (linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace. direct ptrace.
Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.c Index: gdb-7.4.50.20120714/gdb/common/linux-ptrace.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/common/linux-ptrace.c 2012-03-13 16:02:23.000000000 +0100 --- gdb-7.4.50.20120714.orig/gdb/common/linux-ptrace.c 2012-07-07 14:13:56.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/common/linux-ptrace.c 2012-06-02 20:37:53.933828570 +0200 +++ gdb-7.4.50.20120714/gdb/common/linux-ptrace.c 2012-07-14 23:30:02.918167283 +0200
@@ -27,6 +27,10 @@ @@ -28,6 +28,10 @@
#include "linux-procfs.h"
#include "buffer.h" #include "buffer.h"
#include "gdb_assert.h"
+#ifdef HAVE_SELINUX_SELINUX_H +#ifdef HAVE_SELINUX_SELINUX_H
+# include <selinux/selinux.h> +# include <selinux/selinux.h>
@ -52,13 +52,19 @@ Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.c
/* Find all possible reasons we could fail to attach PID and append these /* Find all possible reasons we could fail to attach PID and append these
newline terminated reason strings to initialized BUFFER. '\0' termination newline terminated reason strings to initialized BUFFER. '\0' termination
of BUFFER must be done by the caller. */ of BUFFER must be done by the caller. */
@@ -46,4 +50,22 @@ linux_ptrace_attach_warnings (pid_t pid, @@ -47,6 +51,8 @@ linux_ptrace_attach_warnings (pid_t pid,
buffer_xml_printf (buffer, _("warning: process %d is a zombie " buffer_xml_printf (buffer, _("warning: process %d is a zombie "
"- the process has already terminated\n"), "- the process has already terminated\n"),
(int) pid); (int) pid);
+ +
+ linux_ptrace_create_warnings (buffer); + linux_ptrace_create_warnings (buffer);
+} }
#ifdef __i386__
@@ -171,3 +177,19 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx ();
}
+ +
+/* Print all possible reasons we could fail to create a traced process. */ +/* Print all possible reasons we could fail to create a traced process. */
+ +
@ -74,23 +80,23 @@ Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.c
+ "you can disable this process attach protection by: " + "you can disable this process attach protection by: "
+ "(gdb) shell sudo setsebool deny_ptrace=0")); + "(gdb) shell sudo setsebool deny_ptrace=0"));
+#endif /* HAVE_LIBSELINUX */ +#endif /* HAVE_LIBSELINUX */
} +}
Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.h Index: gdb-7.4.50.20120714/gdb/common/linux-ptrace.h
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/common/linux-ptrace.h 2012-03-13 16:02:23.000000000 +0100 --- gdb-7.4.50.20120714.orig/gdb/common/linux-ptrace.h 2012-07-07 14:13:56.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/common/linux-ptrace.h 2012-06-02 20:37:46.565831956 +0200 +++ gdb-7.4.50.20120714/gdb/common/linux-ptrace.h 2012-07-14 23:29:20.927399812 +0200
@@ -68,5 +68,6 @@ struct buffer; @@ -69,5 +69,6 @@ struct buffer;
#endif
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer); extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_init_warnings (void);
+extern void linux_ptrace_create_warnings (struct buffer *buffer); +extern void linux_ptrace_create_warnings (struct buffer *buffer);
#endif /* COMMON_LINUX_PTRACE_H */ #endif /* COMMON_LINUX_PTRACE_H */
Index: gdb-7.4.50.20120602/gdb/configure.ac Index: gdb-7.4.50.20120714/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/configure.ac 2012-06-02 20:05:08.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/configure.ac 2012-07-14 23:28:57.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/configure.ac 2012-06-02 20:35:06.379798726 +0200 +++ gdb-7.4.50.20120714/gdb/configure.ac 2012-07-14 23:29:09.492462934 +0200
@@ -2002,6 +2002,10 @@ then @@ -2008,6 +2008,10 @@ then
[Define if you support the personality syscall.]) [Define if you support the personality syscall.])
fi fi
@ -101,10 +107,10 @@ Index: gdb-7.4.50.20120602/gdb/configure.ac
dnl Handle optional features that can be enabled. dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Index: gdb-7.4.50.20120602/gdb/gdbserver/configure.ac Index: gdb-7.4.50.20120714/gdb/gdbserver/configure.ac
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/configure.ac 2012-04-19 21:34:51.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/gdbserver/configure.ac 2012-04-19 21:34:51.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/configure.ac 2012-06-02 20:35:06.408797663 +0200 +++ gdb-7.4.50.20120714/gdb/gdbserver/configure.ac 2012-07-14 23:29:09.492462934 +0200
@@ -438,6 +438,10 @@ if $want_ipa ; then @@ -438,6 +438,10 @@ if $want_ipa ; then
fi fi
fi fi
@ -116,10 +122,10 @@ Index: gdb-7.4.50.20120602/gdb/gdbserver/configure.ac
AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS) AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(USE_THREAD_DB) AC_SUBST(USE_THREAD_DB)
Index: gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c Index: gdb-7.4.50.20120714/gdb/gdbserver/linux-low.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/linux-low.c 2012-05-30 21:51:38.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/gdbserver/linux-low.c 2012-07-07 14:13:57.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c 2012-06-02 20:39:49.886785355 +0200 +++ gdb-7.4.50.20120714/gdb/gdbserver/linux-low.c 2012-07-14 23:29:09.496462912 +0200
@@ -601,6 +601,28 @@ add_lwp (ptid_t ptid) @@ -601,6 +601,28 @@ add_lwp (ptid_t ptid)
return lwp; return lwp;
} }
@ -158,7 +164,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL); signal (__SIGRTMIN + 1, SIG_DFL);
@@ -4567,7 +4589,7 @@ linux_tracefork_grandchild (void *arg) @@ -4572,7 +4594,7 @@ linux_tracefork_grandchild (void *arg)
static int static int
linux_tracefork_child (void *arg) linux_tracefork_child (void *arg)
{ {
@ -167,10 +173,10 @@ Index: gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c
kill (getpid (), SIGSTOP); kill (getpid (), SIGSTOP);
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) #if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
Index: gdb-7.4.50.20120602/gdb/inf-ptrace.c Index: gdb-7.4.50.20120714/gdb/inf-ptrace.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/inf-ptrace.c 2012-05-24 18:51:34.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/inf-ptrace.c 2012-05-24 18:51:34.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/inf-ptrace.c 2012-06-02 20:35:06.428797311 +0200 +++ gdb-7.4.50.20120714/gdb/inf-ptrace.c 2012-07-14 23:29:09.496462912 +0200
@@ -105,7 +105,15 @@ static void @@ -105,7 +105,15 @@ static void
inf_ptrace_me (void) inf_ptrace_me (void)
{ {
@ -187,11 +193,11 @@ Index: gdb-7.4.50.20120602/gdb/inf-ptrace.c
} }
/* Start a new inferior Unix child process. EXEC_FILE is the file to /* Start a new inferior Unix child process. EXEC_FILE is the file to
Index: gdb-7.4.50.20120602/gdb/linux-nat.c Index: gdb-7.4.50.20120714/gdb/linux-nat.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 20:01:38.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/linux-nat.c 2012-07-14 23:21:32.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 20:41:18.101751186 +0200 +++ gdb-7.4.50.20120714/gdb/linux-nat.c 2012-07-14 23:29:09.497462907 +0200
@@ -1572,6 +1572,7 @@ linux_nat_create_inferior (struct target @@ -1574,6 +1574,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY #ifdef HAVE_PERSONALITY
int personality_orig = 0, personality_set = 0; int personality_orig = 0, personality_set = 0;
#endif /* HAVE_PERSONALITY */ #endif /* HAVE_PERSONALITY */
@ -199,7 +205,7 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.c
/* The fork_child mechanism is synchronous and calls target_wait, so /* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */ we have to mask the async mode. */
@@ -1596,7 +1597,10 @@ linux_nat_create_inferior (struct target @@ -1598,7 +1599,10 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */ /* Make sure we report all signals during startup. */
linux_nat_pass_signals (0, NULL); linux_nat_pass_signals (0, NULL);
@ -211,7 +217,7 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.c
#ifdef HAVE_PERSONALITY #ifdef HAVE_PERSONALITY
if (personality_set) if (personality_set)
@@ -1608,6 +1612,24 @@ linux_nat_create_inferior (struct target @@ -1610,6 +1614,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno)); safe_strerror (errno));
} }
#endif /* HAVE_PERSONALITY */ #endif /* HAVE_PERSONALITY */

View File

@ -1,141 +0,0 @@
http://sourceware.org/ml/gdb-patches/2010-09/msg00361.html
Subject: [patch 4/4]#3 Remove redundant lp->siginfo
Hi,
this is a simplification which should not affect GDB behavior. As linux-nat
now stops on each received signal without any reordering of them then
PTRACE_GETSIGINFO is enough to access siginfo, without any need to copy it in
advance.
Thanks,
Jan
gdb/
2010-09-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>
(linux_nat_resume): Remove LP->SIGINFO clearing.
(save_siginfo): Remove.
(stop_wait_callback) <WSTOPSIG (status) != SIGSTOP>
(linux_nat_filter_event) <linux_nat_status_is_event (status)>: Remove
the save_siginfo call.
(resume_stopped_resumed_lwps): Remove LP->SIGINFO clearing.
(linux_nat_set_siginfo_fixup): Use PTRACE_GETSIGINFO.
* linux-nat.h (struct lwp_info) <siginfo>: Remove.
Index: gdb-7.4.50.20120703/gdb/linux-nat.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/linux-nat.c 2012-07-03 17:33:02.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/linux-nat.c 2012-07-03 17:38:36.738142509 +0200
@@ -1933,7 +1933,6 @@ resume_lwp (struct lwp_info *lp, int ste
step, signo);
lp->stopped = 0;
lp->step = step;
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
}
else
@@ -2092,7 +2091,6 @@ linux_nat_resume (struct target_ops *ops
if (linux_nat_prepare_to_resume != NULL)
linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, ptid, step, signo);
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
if (debug_linux_nat)
@@ -2646,22 +2644,6 @@ wait_lwp (struct lwp_info *lp)
return status;
}
-/* Save the most recent siginfo for LP. This is currently only called
- for SIGTRAP; some ports use the si_addr field for
- target_stopped_data_address. In the future, it may also be used to
- restore the siginfo of requeued signals. */
-
-static void
-save_siginfo (struct lwp_info *lp)
-{
- errno = 0;
- ptrace (PTRACE_GETSIGINFO, GET_LWP (lp->ptid),
- (PTRACE_TYPE_ARG3) 0, &lp->siginfo);
-
- if (errno != 0)
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
-}
-
/* Send a SIGSTOP to LP. */
static int
@@ -2904,9 +2886,6 @@ stop_wait_callback (struct lwp_info *lp,
{
/* The thread was stopped with a signal other than SIGSTOP. */
- /* Save the trap's siginfo in case we need it later. */
- save_siginfo (lp);
-
save_sigtrap (lp);
if (debug_linux_nat)
@@ -3288,12 +3267,7 @@ linux_nat_filter_event (int lwpid, int s
}
if (linux_nat_status_is_event (status))
- {
- /* Save the trap's siginfo in case we need it later. */
- save_siginfo (lp);
-
- save_sigtrap (lp);
- }
+ save_sigtrap (lp);
/* Check if the thread has exited. */
if ((WIFEXITED (status) || WIFSIGNALED (status))
@@ -3947,7 +3921,6 @@ resume_stopped_resumed_lwps (struct lwp_
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
lp->step, GDB_SIGNAL_0);
lp->stopped = 0;
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
}
@@ -5224,11 +5197,19 @@ linux_nat_set_prepare_to_resume (struct
siginfo_t *
linux_nat_get_siginfo (ptid_t ptid)
{
- struct lwp_info *lp = find_lwp_pid (ptid);
+ static siginfo_t siginfo;
+ int pid;
- gdb_assert (lp != NULL);
+ pid = GET_LWP (ptid);
+ if (pid == 0)
+ pid = GET_PID (ptid);
+
+ errno = 0;
+ ptrace (PTRACE_GETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo);
+ if (errno != 0)
+ memset (&siginfo, 0, sizeof (siginfo));
- return &lp->siginfo;
+ return &siginfo;
}
/* Provide a prototype to silence -Wmissing-prototypes. */
Index: gdb-7.4.50.20120703/gdb/linux-nat.h
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/linux-nat.h 2012-07-03 17:30:09.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/linux-nat.h 2012-07-03 17:38:13.501170247 +0200
@@ -76,10 +76,6 @@ struct lwp_info
/* The kind of stepping of this LWP. */
enum resume_step step;
- /* Non-zero si_signo if this LWP stopped with a trap. si_addr may
- be the address of a hardware watchpoint. */
- siginfo_t siginfo;
-
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
watchpoint trap. */
int stopped_by_watchpoint;

View File

@ -4,10 +4,10 @@ Date: Mon Aug 8 12:08:53 2011 +0200
+testcase +testcase
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c 2012-07-03 17:44:45.797698656 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c 2012-07-15 08:51:38.238701282 +0200
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -49,10 +49,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
+ i = pthread_join (t, NULL); + i = pthread_join (t, NULL);
+ assert (i == 0); + assert (i == 0);
+} +}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.c Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.c 2012-07-03 17:44:45.798698655 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.c 2012-07-15 08:51:38.239701277 +0200
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +
@ -100,10 +100,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.c
+ +
+ return 0; + return 0;
+} +}
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.exp Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.exp 2012-07-03 17:44:45.798698655 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.threads/dlopen-libpthread.exp 2012-07-15 09:08:01.760258588 +0200
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
+# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011 Free Software Foundation, Inc.
+# +#
@ -148,12 +148,12 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+ return -1 + return -1
+} +}
+ +
+set test "print _dl_debug_notify" +set test "info probes all rtld rtld_map_complete"
+gdb_test_multiple $test $test { +gdb_test_multiple $test $test {
+ -re " 0x\[0-9a-f\]+ <_dl_debug_notify>\r\n$gdb_prompt $" { + -re "\[ \t\]rtld_map_complete\[ \t\]+0x\[0-9a-f\]+.*\r\n$gdb_prompt $" {
+ pass $test + pass $test
+ } + }
+ -re "No symbol \"_dl_debug_notify\" in current context\\.\r\n$gdb_prompt $" { + -re "No probes matched\\.\r\n$gdb_prompt $" {
+ xfail $test + xfail $test
+ untested ${testfile}.exp + untested ${testfile}.exp
+ return + return
@ -179,24 +179,23 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+gdb_continue_to_breakpoint "notify" ".* notify-here .*" +gdb_continue_to_breakpoint "notify" ".* notify-here .*"
+ +
+gdb_test "info sharedlibrary" {/libpthread\.so.*} "libpthread.so found" +gdb_test "info sharedlibrary" {/libpthread\.so.*} "libpthread.so found"
Index: gdb-7.4.50.20120703/gdb/testsuite/lib/gdb.exp Index: gdb-7.4.50.20120714/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/lib/gdb.exp 2012-07-03 17:34:18.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/testsuite/lib/gdb.exp 2012-07-15 08:51:36.803709222 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/lib/gdb.exp 2012-07-03 17:46:44.316514076 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/lib/gdb.exp 2012-07-15 09:02:41.983028197 +0200
@@ -3758,23 +3758,7 @@ proc build_executable { testname executa @@ -3774,22 +3774,6 @@ proc build_executable_from_specs {testna
set sources ${executable}.c
} set binfile [standard_output_file $executable]
- set binfile [standard_output_file $executable]
-
- set objects {} - set objects {}
- for {set i 0} "\$i<[llength $sources]" {incr i} { - set i 0
- set s [lindex $sources $i] - foreach {s local_options} $args {
- if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options] != "" } { - if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } {
- untested $testname - untested $testname
- return -1 - return -1
- } - }
- lappend objects "${binfile}${i}.o" - lappend objects "${binfile}${i}.o"
- incr i
- } - }
- -
- if { [gdb_compile $objects "${binfile}" executable $options] != "" } { - if { [gdb_compile $objects "${binfile}" executable $options] != "" } {
@ -204,11 +203,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/lib/gdb.exp
- return -1 - return -1
- } - }
- -
+ # get_compiler_info by gdb_compile_shlib and gdb_compile_shlib_pthreads.
set info_options "" set info_options ""
if { [lsearch -exact $options "c++"] >= 0 } { if { [lsearch -exact $options "c++"] >= 0 } {
set info_options "c++" set info_options "c++"
@@ -3782,6 +3766,41 @@ proc build_executable { testname executa @@ -3797,6 +3781,42 @@ proc build_executable_from_specs {testna
if [get_compiler_info ${info_options}] { if [get_compiler_info ${info_options}] {
return -1 return -1
} }
@ -223,22 +221,23 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/lib/gdb.exp
+ +
+ # gdb_compile_shlib and gdb_compile_shlib_pthreads do not use the 3rd + # gdb_compile_shlib and gdb_compile_shlib_pthreads do not use the 3rd
+ # parameter. They also requires $sources while gdb_compile and + # parameter. They also requires $sources while gdb_compile and
+ # gdb_compile_pthreads require $objects. + # gdb_compile_pthreads require $objects. Moreover they ignore any options.
+ if [string match gdb_compile_shlib* $func] { + if [string match gdb_compile_shlib* $func] {
+ set sources_path {} + set sources_path {}
+ foreach s $sources { + foreach {s local_options} $args {
+ lappend sources_path "${srcdir}/${subdir}/${s}" + lappend sources_path "${srcdir}/${subdir}/${s}"
+ } + }
+ set ret [$func $sources_path "${binfile}" $options] + set ret [$func $sources_path "${binfile}" $options]
+ } else { + } else {
+ set objects {} + set objects {}
+ for {set i 0} "\$i<[llength $sources]" {incr i} { + set i 0
+ set s [lindex $sources $i] + foreach {s local_options} $args {
+ if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options] != "" } { + if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } {
+ untested $testname + untested $testname
+ return -1 + return -1
+ } + }
+ lappend objects "${binfile}${i}.o" + lappend objects "${binfile}${i}.o"
+ incr i
+ } + }
+ set ret [$func $objects "${binfile}" executable $options] + set ret [$func $objects "${binfile}" executable $options]
+ } + }
@ -250,10 +249,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/lib/gdb.exp
return 0 return 0
} }
Index: gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp Index: gdb-7.4.50.20120714/gdb/testsuite/lib/prelink-support.exp
=================================================================== ===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/lib/prelink-support.exp 2012-01-04 09:27:56.000000000 +0100 --- gdb-7.4.50.20120714.orig/gdb/testsuite/lib/prelink-support.exp 2012-01-04 09:27:56.000000000 +0100
+++ gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp 2012-07-03 17:44:45.803698648 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/lib/prelink-support.exp 2012-07-15 08:51:38.243701254 +0200
@@ -95,8 +95,9 @@ proc file_copy {src dest} { @@ -95,8 +95,9 @@ proc file_copy {src dest} {
# Wrap function build_executable so that the resulting executable is fully # Wrap function build_executable so that the resulting executable is fully
# self-sufficient (without dependencies on system libraries). Parameter # self-sufficient (without dependencies on system libraries). Parameter
@ -306,10 +305,10 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp
return $prelink_args return $prelink_args
} }
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.base/break-interp.exp
=================================================================== ===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-06-21 22:46:21.000000000 +0200 --- gdb-7.4.50.20120714.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-06-21 22:46:21.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp 2012-07-03 17:44:45.804698647 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.base/break-interp.exp 2012-07-15 08:51:38.244701248 +0200
@@ -109,14 +109,21 @@ proc strip_debug {dest} { @@ -109,14 +109,21 @@ proc strip_debug {dest} {
} }
} }

View File

@ -1,236 +0,0 @@
Regression: Invalid data type for function to be called. [Re: FYI: fix PR 9514]
http://sourceware.org/ml/gdb-patches/2012-07/msg00043.html
reverted:
http://sourceware.org/ml/gdb-cvs/2012-06/msg00148.html
diff -dup -rup gdb-7.4.50.20120703-orig/gdb/c-exp.y gdb-7.4.50.20120703/gdb/c-exp.y
--- gdb-7.4.50.20120703-orig/gdb/c-exp.y 2012-07-03 20:08:15.976418420 +0200
+++ gdb-7.4.50.20120703/gdb/c-exp.y 2012-07-03 20:08:35.935390282 +0200
@@ -172,10 +172,9 @@ static struct stoken operator_stoken (co
/* %type <bval> block */
/* Fancy type parsing. */
-%type <voidval> func_mod direct_abs_decl abs_decl ptr_operator
+%type <voidval> func_mod direct_abs_decl abs_decl
%type <tval> ptype
%type <lval> array_mod
-%type <tval> conversion_type_id
%token <typed_val_int> INT
%token <typed_val_float> FLOAT
@@ -932,7 +931,9 @@ variable: name_not_typename
;
space_identifier : '@' NAME
- { insert_type_address_space (copy_name ($2.stoken)); }
+ { push_type_address_space (copy_name ($2.stoken));
+ push_type (tp_space_identifier);
+ }
;
const_or_volatile: const_or_volatile_noopt
@@ -951,23 +952,14 @@ const_or_volatile_or_space_identifier:
|
;
-ptr_operator:
- ptr_operator '*'
- { insert_type (tp_pointer); }
- const_or_volatile_or_space_identifier
- { $$ = 0; }
- | '*'
- { insert_type (tp_pointer); }
- const_or_volatile_or_space_identifier
- { $$ = 0; }
+abs_decl: '*'
+ { push_type (tp_pointer); $$ = 0; }
+ | '*' abs_decl
+ { push_type (tp_pointer); $$ = $2; }
| '&'
- { insert_type (tp_reference); $$ = 0; }
- | '&' ptr_operator
- { insert_type (tp_reference); $$ = 0; }
- ;
-
-abs_decl: ptr_operator direct_abs_decl
- | ptr_operator
+ { push_type (tp_reference); $$ = 0; }
+ | '&' abs_decl
+ { push_type (tp_reference); $$ = $2; }
| direct_abs_decl
;
@@ -1211,30 +1203,22 @@ nonempty_typelist
;
ptype : typebase
- | ptype abs_decl
- { $$ = follow_types ($1); }
- ;
-
-conversion_type_id: typebase conversion_declarator
+ | ptype const_or_volatile_or_space_identifier abs_decl const_or_volatile_or_space_identifier
{ $$ = follow_types ($1); }
;
-conversion_declarator: /* Nothing. */
- | ptr_operator conversion_declarator
- ;
-
const_and_volatile: CONST_KEYWORD VOLATILE_KEYWORD
| VOLATILE_KEYWORD CONST_KEYWORD
;
const_or_volatile_noopt: const_and_volatile
- { insert_type (tp_const);
- insert_type (tp_volatile);
+ { push_type (tp_const);
+ push_type (tp_volatile);
}
| CONST_KEYWORD
- { insert_type (tp_const); }
+ { push_type (tp_const); }
| VOLATILE_KEYWORD
- { insert_type (tp_volatile); }
+ { push_type (tp_volatile); }
;
operator: OPERATOR NEW
@@ -1341,7 +1325,7 @@ operator: OPERATOR NEW
{ $$ = operator_stoken ("()"); }
| OPERATOR '[' ']'
{ $$ = operator_stoken ("[]"); }
- | OPERATOR conversion_type_id
+ | OPERATOR ptype
{ char *name;
long length;
struct ui_file *buf = mem_fileopen ();
diff -dup -rup gdb-7.4.50.20120703-orig/gdb/parse.c gdb-7.4.50.20120703/gdb/parse.c
--- gdb-7.4.50.20120703-orig/gdb/parse.c 2012-07-03 20:08:15.979418415 +0200
+++ gdb-7.4.50.20120703/gdb/parse.c 2012-07-03 20:08:35.938390277 +0200
@@ -1370,49 +1370,6 @@ check_type_stack_depth (void)
}
}
-/* A helper function for insert_type and insert_type_address_space.
- This does work of expanding the type stack and inserting the new
- element, ELEMENT, into the stack at location SLOT. */
-
-static void
-insert_into_type_stack (int slot, union type_stack_elt element)
-{
- check_type_stack_depth ();
-
- if (slot < type_stack_depth)
- memmove (&type_stack[slot + 1], &type_stack[slot],
- (type_stack_depth - slot) * sizeof (union type_stack_elt));
- type_stack[slot] = element;
- ++type_stack_depth;
-}
-
-/* Insert a new type, TP, at the bottom of the type stack. If TP is
- tp_pointer or tp_reference, it is inserted at the bottom. If TP is
- a qualifier, it is inserted at slot 1 (just above a previous
- tp_pointer) if there is anything on the stack, or simply pushed if
- the stack is empty. Other values for TP are invalid. */
-
-void
-insert_type (enum type_pieces tp)
-{
- union type_stack_elt element;
- int slot;
-
- gdb_assert (tp == tp_pointer || tp == tp_reference
- || tp == tp_const || tp == tp_volatile);
-
- /* If there is anything on the stack (we know it will be a
- tp_pointer), insert the qualifier above it. Otherwise, simply
- push this on the top of the stack. */
- if (type_stack_depth && (tp == tp_const || tp == tp_volatile))
- slot = 1;
- else
- slot = 0;
-
- element.piece = tp;
- insert_into_type_stack (slot, element);
-}
-
void
push_type (enum type_pieces tp)
{
@@ -1427,32 +1384,10 @@ push_type_int (int n)
type_stack[type_stack_depth++].int_val = n;
}
-/* Insert a tp_space_identifier and the corresponding address space
- value into the stack. STRING is the name of an address space, as
- recognized by address_space_name_to_int. If the stack is empty,
- the new elements are simply pushed. If the stack is not empty,
- this function assumes that the first item on the stack is a
- tp_pointer, and the new values are inserted above the first
- item. */
-
void
-insert_type_address_space (char *string)
+push_type_address_space (char *string)
{
- union type_stack_elt element;
- int slot;
-
- /* If there is anything on the stack (we know it will be a
- tp_pointer), insert the address space qualifier above it.
- Otherwise, simply push this on the top of the stack. */
- if (type_stack_depth)
- slot = 1;
- else
- slot = 0;
-
- element.piece = tp_space_identifier;
- insert_into_type_stack (slot, element);
- element.int_val = address_space_name_to_int (parse_gdbarch, string);
- insert_into_type_stack (slot, element);
+ push_type_int (address_space_name_to_int (parse_gdbarch, string));
}
enum type_pieces
Only in gdb-7.4.50.20120703-orig/gdb: parse.c.orig
diff -dup -rup gdb-7.4.50.20120703-orig/gdb/parser-defs.h gdb-7.4.50.20120703/gdb/parser-defs.h
--- gdb-7.4.50.20120703-orig/gdb/parser-defs.h 2012-07-03 20:08:15.980418414 +0200
+++ gdb-7.4.50.20120703/gdb/parser-defs.h 2012-07-03 20:08:35.939390275 +0200
@@ -192,13 +192,11 @@ extern int end_arglist (void);
extern char *copy_name (struct stoken);
-extern void insert_type (enum type_pieces);
-
extern void push_type (enum type_pieces);
extern void push_type_int (int);
-extern void insert_type_address_space (char *);
+extern void push_type_address_space (char *);
extern enum type_pieces pop_type (void);
diff -dup -rup gdb-7.4.50.20120703-orig/gdb/testsuite/gdb.base/whatis.exp gdb-7.4.50.20120703/gdb/testsuite/gdb.base/whatis.exp
--- gdb-7.4.50.20120703-orig/gdb/testsuite/gdb.base/whatis.exp 2012-07-03 20:08:15.981418413 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/whatis.exp 2012-07-03 20:08:35.940390273 +0200
@@ -465,17 +465,3 @@ gdb_test "whatis char_addr" \
gdb_test "whatis a_char_addr" \
"type = char_addr" \
"whatis applied to variable defined by typedef"
-
-# Regression tests for PR 9514.
-
-gdb_test "whatis void (**)()" \
- "type = void \\(\\*\\*\\)\\(\\)" \
- "whatis applied to pointer to pointer to function"
-
-gdb_test "whatis void (** const)()" \
- "type = void \\(\\*\\* const\\)\\(\\)" \
- "whatis applied to const pointer to pointer to function"
-
-gdb_test "whatis void (* const *)()" \
- "type = void \\(\\* const \\*\\)\\(\\)" \
- "whatis applied to pointer to const pointer to function"

View File

@ -1,8 +1,8 @@
Index: gdb-7.4.50.20120602/gdb/dwarf2read.c Index: gdb-7.4.50.20120714/gdb/dwarf2read.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/dwarf2read.c 2012-07-14 23:36:09.882136546 +0200
+++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 21:32:54.304562500 +0200 +++ gdb-7.4.50.20120714/gdb/dwarf2read.c 2012-07-14 23:36:11.032130182 +0200
@@ -9736,12 +9736,14 @@ read_set_type (struct die_info *die, str @@ -11003,12 +11003,14 @@ read_set_type (struct die_info *die, str
return set_die_type (die, set_type, cu); return set_die_type (die, set_type, cu);
} }
@ -19,7 +19,7 @@ Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
struct attribute *attr; struct attribute *attr;
struct symbol *sym; struct symbol *sym;
CORE_ADDR base = (CORE_ADDR) 0; CORE_ADDR base = (CORE_ADDR) 0;
@@ -9766,20 +9768,67 @@ read_common_block (struct die_info *die, @@ -11033,20 +11035,67 @@ read_common_block (struct die_info *die,
} }
if (die->child != NULL) if (die->child != NULL)
{ {
@ -87,7 +87,7 @@ Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
} }
} }
@@ -13661,6 +13710,13 @@ new_symbol_full (struct die_info *die, s @@ -15085,6 +15134,13 @@ new_symbol_full (struct die_info *die, s
{ {
var_decode_location (attr, sym, cu); var_decode_location (attr, sym, cu);
attr2 = dwarf2_attr (die, DW_AT_external, cu); attr2 = dwarf2_attr (die, DW_AT_external, cu);
@ -101,7 +101,7 @@ Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
if (SYMBOL_CLASS (sym) == LOC_STATIC if (SYMBOL_CLASS (sym) == LOC_STATIC
&& SYMBOL_VALUE_ADDRESS (sym) == 0 && SYMBOL_VALUE_ADDRESS (sym) == 0
&& !dwarf2_per_objfile->has_section_at_zero) && !dwarf2_per_objfile->has_section_at_zero)
@@ -13825,6 +13881,11 @@ new_symbol_full (struct die_info *die, s @@ -15249,6 +15305,11 @@ new_symbol_full (struct die_info *die, s
SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_CLASS (sym) = LOC_TYPEDEF;
list_to_add = &global_symbols; list_to_add = &global_symbols;
break; break;
@ -113,10 +113,10 @@ Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
default: default:
/* Not a tag we recognize. Hopefully we aren't processing /* Not a tag we recognize. Hopefully we aren't processing
trash data, but since we must specifically ignore things trash data, but since we must specifically ignore things
Index: gdb-7.4.50.20120602/gdb/f-lang.c Index: gdb-7.4.50.20120714/gdb/f-lang.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/f-lang.c 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/f-lang.c 2012-07-14 23:36:10.993130398 +0200
+++ gdb-7.4.50.20120602/gdb/f-lang.c 2012-06-02 21:32:54.305562499 +0200 +++ gdb-7.4.50.20120714/gdb/f-lang.c 2012-07-14 23:36:11.033130176 +0200
@@ -370,27 +370,3 @@ _initialize_f_language (void) @@ -370,27 +370,3 @@ _initialize_f_language (void)
add_language (&f_language_defn); add_language (&f_language_defn);
@ -145,10 +145,10 @@ Index: gdb-7.4.50.20120602/gdb/f-lang.c
- } - }
- return (NULL); - return (NULL);
-} -}
Index: gdb-7.4.50.20120602/gdb/f-lang.h Index: gdb-7.4.50.20120714/gdb/f-lang.h
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/f-lang.h 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/f-lang.h 2012-07-14 23:36:10.994130392 +0200
+++ gdb-7.4.50.20120602/gdb/f-lang.h 2012-06-02 21:32:54.322562493 +0200 +++ gdb-7.4.50.20120714/gdb/f-lang.h 2012-07-14 23:36:11.034130171 +0200
@@ -52,37 +52,8 @@ enum f90_range_type @@ -52,37 +52,8 @@ enum f90_range_type
NONE_BOUND_DEFAULT /* "(low:high)" */ NONE_BOUND_DEFAULT /* "(low:high)" */
}; };
@ -187,10 +187,10 @@ Index: gdb-7.4.50.20120602/gdb/f-lang.h
/* When reasonable array bounds cannot be fetched, such as when /* When reasonable array bounds cannot be fetched, such as when
you ask to 'mt print symbols' and there is no stack frame and you ask to 'mt print symbols' and there is no stack frame and
Index: gdb-7.4.50.20120602/gdb/f-valprint.c Index: gdb-7.4.50.20120714/gdb/f-valprint.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/f-valprint.c 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/f-valprint.c 2012-07-14 23:36:10.995130387 +0200
+++ gdb-7.4.50.20120602/gdb/f-valprint.c 2012-06-02 21:33:50.514541286 +0200 +++ gdb-7.4.50.20120714/gdb/f-valprint.c 2012-07-14 23:36:53.747893779 +0200
@@ -34,10 +34,11 @@ @@ -34,10 +34,11 @@
#include "gdbcore.h" #include "gdbcore.h"
#include "command.h" #include "command.h"
@ -204,15 +204,14 @@ Index: gdb-7.4.50.20120602/gdb/f-valprint.c
static void f77_create_arrayprint_offset_tbl (struct type *, static void f77_create_arrayprint_offset_tbl (struct type *,
struct ui_file *); struct ui_file *);
static void f77_get_dynamic_length_of_aggregate (struct type *); static void f77_get_dynamic_length_of_aggregate (struct type *);
@@ -420,22 +421,54 @@ f_val_print (struct type *type, const gd @@ -420,22 +421,53 @@ f_val_print (struct type *type, const gd
gdb_flush (stream); gdb_flush (stream);
} }
-static void -static void
-list_all_visible_commons (const char *funname) -list_all_visible_commons (const char *funname)
+static int +static int
+info_common_command_for_block (struct block *block, struct frame_info *frame, +info_common_command_for_block (struct block *block, const char *comname)
+ const char *comname)
{ {
- SAVED_F77_COMMON_PTR tmp; - SAVED_F77_COMMON_PTR tmp;
- -
@ -272,7 +271,7 @@ Index: gdb-7.4.50.20120602/gdb/f-valprint.c
} }
/* This function is used to print out the values in a given COMMON /* This function is used to print out the values in a given COMMON
@@ -445,11 +478,9 @@ list_all_visible_commons (const char *fu @@ -445,11 +477,9 @@ list_all_visible_commons (const char *fu
static void static void
info_common_command (char *comname, int from_tty) info_common_command (char *comname, int from_tty)
{ {
@ -286,7 +285,7 @@ Index: gdb-7.4.50.20120602/gdb/f-valprint.c
/* We have been told to display the contents of F77 COMMON /* We have been told to display the contents of F77 COMMON
block supposedly visible in this function. Let us block supposedly visible in this function. Let us
@@ -461,74 +492,31 @@ info_common_command (char *comname, int @@ -461,74 +491,31 @@ info_common_command (char *comname, int
/* The following is generally ripped off from stack.c's routine /* The following is generally ripped off from stack.c's routine
print_frame_info(). */ print_frame_info(). */
@ -340,7 +339,7 @@ Index: gdb-7.4.50.20120602/gdb/f-valprint.c
{ {
- list_all_visible_commons (funname); - list_all_visible_commons (funname);
- return; - return;
+ if (info_common_command_for_block (block, fi, comname)) + if (info_common_command_for_block (block, comname))
+ values_printed = 1; + values_printed = 1;
+ /* After handling the function's top-level block, stop. Don't + /* After handling the function's top-level block, stop. Don't
+ continue to its superblock, the block of per-file symbols. */ + continue to its superblock, the block of per-file symbols. */
@ -377,10 +376,10 @@ Index: gdb-7.4.50.20120602/gdb/f-valprint.c
} }
void void
Index: gdb-7.4.50.20120602/gdb/stack.c Index: gdb-7.4.50.20120714/gdb/stack.c
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/stack.c 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/stack.c 2012-07-14 23:36:09.315139683 +0200
+++ gdb-7.4.50.20120602/gdb/stack.c 2012-06-02 21:32:54.335562488 +0200 +++ gdb-7.4.50.20120714/gdb/stack.c 2012-07-14 23:36:11.036130161 +0200
@@ -1838,6 +1838,8 @@ iterate_over_block_locals (struct block @@ -1838,6 +1838,8 @@ iterate_over_block_locals (struct block
case LOC_COMPUTED: case LOC_COMPUTED:
if (SYMBOL_IS_ARGUMENT (sym)) if (SYMBOL_IS_ARGUMENT (sym))
@ -390,11 +389,11 @@ Index: gdb-7.4.50.20120602/gdb/stack.c
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data); (*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
break; break;
Index: gdb-7.4.50.20120602/gdb/symtab.h Index: gdb-7.4.50.20120714/gdb/symtab.h
=================================================================== ===================================================================
--- gdb-7.4.50.20120602.orig/gdb/symtab.h 2012-06-02 21:32:41.746567299 +0200 --- gdb-7.4.50.20120714.orig/gdb/symtab.h 2012-06-30 00:46:46.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/symtab.h 2012-06-02 21:32:54.342562486 +0200 +++ gdb-7.4.50.20120714/gdb/symtab.h 2012-07-14 23:36:11.038130149 +0200
@@ -389,7 +389,10 @@ typedef enum domain_enum_tag @@ -394,7 +394,10 @@ typedef enum domain_enum_tag
/* LABEL_DOMAIN may be used for names of labels (for gotos). */ /* LABEL_DOMAIN may be used for names of labels (for gotos). */
@ -406,10 +405,10 @@ Index: gdb-7.4.50.20120602/gdb/symtab.h
} domain_enum; } domain_enum;
/* Searching domains, used for `search_symbols'. Element numbers are /* Searching domains, used for `search_symbols'. Element numbers are
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.exp Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.fortran/common-block.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.exp 2012-06-02 21:32:54.344562484 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.fortran/common-block.exp 2012-07-14 23:36:11.038130149 +0200
@@ -0,0 +1,101 @@ @@ -0,0 +1,101 @@
+# Copyright 2008 Free Software Foundation, Inc. +# Copyright 2008 Free Software Foundation, Inc.
+ +
@ -512,10 +511,10 @@ Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.exp
+gdb_test "p ix_x" " = 1 *" "p ix_x in" +gdb_test "p ix_x" " = 1 *" "p ix_x in"
+gdb_test "p iy_y" " = 2 *" "p iy_y in" +gdb_test "p iy_y" " = 2 *" "p iy_y in"
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in" +gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.f90 Index: gdb-7.4.50.20120714/gdb/testsuite/gdb.fortran/common-block.f90
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.f90 2012-06-02 21:32:54.345562483 +0200 +++ gdb-7.4.50.20120714/gdb/testsuite/gdb.fortran/common-block.f90 2012-07-14 23:36:11.038130149 +0200
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
+! Copyright 2008 Free Software Foundation, Inc. +! Copyright 2008 Free Software Foundation, Inc.
+! +!

View File

@ -1,60 +0,0 @@
http://sourceware.org/ml/gdb-patches/2012-06/msg00109.html
Subject: [RFA] Fix inconsistency in blockvector addrmap vs non-addrmap handling
Hi.
I was seeing the assert in dw2_find_pc_sect_psymtab trigger
and traced it to the fact that when pending_addrmap_interesting gets
set blockvector.map is used instead of blockvector.block.
The difference is that blockvector.block contains entries for the global
and static blocks whereas pending_addrmap doesn't.
This patch fixes this by making them consistent.
I suspect more work is necessary (e.g. can symtabs "overlap" even though
the individual pieces do not?).
But I first want to fix the regression introduced by the change
to dw2_find_pc_sect_psymtab: There is more code in a symtab than is
documented by function and lexical block pc ranges (e.g. C++ method thunks).
Regression tested on amd64-linux, and by verifying the assert no longer
triggers in the testcase I was using.
Ok to commit?
Note that this obviates the need for the patch in:
http://sourceware.org/ml/gdb-patches/2012-05/msg00958.html
Also note that this accompanies this patch:
http://sourceware.org/ml/gdb-patches/2012-06/msg00105.html
2012-06-04 Doug Evans <dje@google.com>
* buildsym.c (end_symtab): Add the range of the static block to
the pending addrmap.
Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.97
diff -u -p -r1.97 buildsym.c
--- ./gdb/buildsym.c 29 May 2012 20:23:17 -0000 1.97
+++ ./gdb/buildsym.c 5 Jun 2012 00:26:01 -0000
@@ -1024,8 +1027,15 @@ end_symtab (CORE_ADDR end_addr, struct o
{
/* Define the STATIC_BLOCK & GLOBAL_BLOCK, and build the
blockvector. */
- finish_block (0, &file_symbols, 0, last_source_start_addr,
- end_addr, objfile);
+ struct block *static_block;
+
+ static_block = finish_block (0, &file_symbols, 0,
+ last_source_start_addr, end_addr,
+ objfile);
+ /* Mark the range of the static block so that if we end up using
+ blockvector.map then find_block_in_blockvector behaves identically
+ regardless of whether the addrmap is present. */
+ record_block_range (static_block, last_source_start_addr, end_addr - 1);
finish_block_internal (0, &global_symbols, 0, last_source_start_addr,
end_addr, objfile, 1);
blockvector = make_blockvector (objfile);

View File

@ -0,0 +1,295 @@
http://sourceware.org/ml/gdb-patches/2012-07/msg00197.html
Subject: [patch] Fix another stale frame_info * (PR 11914, like PR 13866)
Hi,
http://sourceware.org/bugzilla/show_bug.cgi?id=11914
has another case of stale frame_info *. Originally I found it unfixable with
the current struct frame_info * usage but Pedro has shown in PR 13866 it is
possible to fix the cases one by one so I have fixed also this one.
It follows the path of valgrind backtrace showing where the memory is being
freed:
http://sourceware.org/bugzilla/show_bug.cgi?id=11914#c5
This message has been already present in GDB so I used it in more cases:
+ warning (_("Unable to restore previously selected frame."));
No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu.
I will check it in soon for 7.5.
I find it a bit difficult to reliably reproduce, this testcases mostly always
crashes for me (at least with -lmcheck).
Thanks,
Jan
gdb/
2012-07-14 Jan Kratochvil <jan.kratochvil@redhat.com>
PR 11914
* f-valprint.c (info_common_command): New variable frame_id.
Reinitialize FI form FRAME_ID after each print_variable_and_value.
* printcmd.c (print_variable_and_value): Extend function comment.
Add comment for invalidated FRAME.
* stack.c (backtrace_command_1): New variable frame_id. Reinitialize
FI form FRAME_ID after each print_frame_local_vars.
(struct print_variable_and_value_data): Change frame to frame_id.
(do_print_variable_and_value): New variable frame, initialize it from
p->frame_id. Add comment for invalidated FRAME.
(print_frame_local_vars, print_frame_arg_vars): New function comment.
Update CB_DATA.FRAME to CB_DATA.FRAME_ID initialization. Add comment
for invalidated FRAME.
gdb/testsuite/
2012-07-14 Jan Kratochvil <jan.kratochvil@redhat.com>
PR 11914
* gdb.python/py-prettyprint.c (eval_func, eval_sub): New.
(main): Call eval_sub.
* gdb.python/py-prettyprint.exp:
(python execfile ('py-prettyprint.py')): Move it earlier.
New breakpoint for eval-break.
(continue to breakpoint: eval-break, info locals): New test.
(python execfile ('py-prettyprint.py')): Move it from here.
* gdb.python/py-prettyprint.py (class pp_eval_type): New.
(register_pretty_printers): Register pp_eval_type.
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 2a0a886..d5b5b63 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1961,7 +1961,9 @@ clear_dangling_display_expressions (struct so_list *solib)
struct symbol. NAME is the name to print; if NULL then VAR's print
name will be used. STREAM is the ui_file on which to print the
value. INDENT specifies the number of indent levels to print
- before printing the variable name. */
+ before printing the variable name.
+
+ This function invalidates FRAME. */
void
print_variable_and_value (const char *name, struct symbol *var,
@@ -1983,6 +1985,10 @@ print_variable_and_value (const char *name, struct symbol *var,
get_user_print_options (&opts);
opts.deref_ref = 1;
common_val_print (val, stream, indent, &opts, current_language);
+
+ /* common_val_print invalidates FRAME when a pretty printer calls inferior
+ function. */
+ frame = NULL;
}
if (except.reason < 0)
fprintf_filtered(stream, "<error reading variable %s (%s)>", name,
diff --git a/gdb/stack.c b/gdb/stack.c
index 2520e2c..35d379d 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1727,7 +1727,20 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty)
the frame->prev field gets set to NULL in that case). */
print_frame_info (fi, 1, LOCATION, 1);
if (show_locals)
- print_frame_local_vars (fi, 1, gdb_stdout);
+ {
+ struct frame_id frame_id = get_frame_id (fi);
+
+ print_frame_local_vars (fi, 1, gdb_stdout);
+
+ /* print_frame_local_vars invalidates FI. */
+ fi = frame_find_by_id (frame_id);
+ if (fi == NULL)
+ {
+ trailing = NULL;
+ warning (_("Unable to restore previously selected frame."));
+ break;
+ }
+ }
/* Save the last frame to check for error conditions. */
trailing = fi;
@@ -1919,7 +1932,7 @@ iterate_over_block_local_vars (struct block *block,
struct print_variable_and_value_data
{
- struct frame_info *frame;
+ struct frame_id frame_id;
int num_tabs;
struct ui_file *stream;
int values_printed;
@@ -1933,12 +1946,28 @@ do_print_variable_and_value (const char *print_name,
void *cb_data)
{
struct print_variable_and_value_data *p = cb_data;
+ struct frame_info *frame;
+
+ frame = frame_find_by_id (p->frame_id);
+ if (frame == NULL)
+ {
+ warning (_("Unable to restore previously selected frame."));
+ return;
+ }
+
+ print_variable_and_value (print_name, sym, frame, p->stream, p->num_tabs);
+
+ /* print_variable_and_value invalidates FRAME. */
+ frame = NULL;
- print_variable_and_value (print_name, sym,
- p->frame, p->stream, p->num_tabs);
p->values_printed = 1;
}
+/* Print all variables from the innermost up to the function block of FRAME.
+ Print them with values to STREAM indented by NUM_TABS.
+
+ This function will invalidate FRAME. */
+
static void
print_frame_local_vars (struct frame_info *frame, int num_tabs,
struct ui_file *stream)
@@ -1961,7 +1990,7 @@ print_frame_local_vars (struct frame_info *frame, int num_tabs,
return;
}
- cb_data.frame = frame;
+ cb_data.frame_id = get_frame_id (frame);
cb_data.num_tabs = 4 * num_tabs;
cb_data.stream = stream;
cb_data.values_printed = 0;
@@ -1970,6 +1999,9 @@ print_frame_local_vars (struct frame_info *frame, int num_tabs,
do_print_variable_and_value,
&cb_data);
+ /* do_print_variable_and_value invalidates FRAME. */
+ frame = NULL;
+
if (!cb_data.values_printed)
fprintf_filtered (stream, _("No locals.\n"));
}
@@ -2016,6 +2048,11 @@ iterate_over_block_arg_vars (struct block *b,
}
}
+/* Print all argument variables of the function of FRAME.
+ Print them with values to STREAM.
+
+ This function will invalidate FRAME. */
+
static void
print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
{
@@ -2036,7 +2073,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
return;
}
- cb_data.frame = frame;
+ cb_data.frame_id = get_frame_id (frame);
cb_data.num_tabs = 0;
cb_data.stream = gdb_stdout;
cb_data.values_printed = 0;
@@ -2044,6 +2081,9 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
iterate_over_block_arg_vars (SYMBOL_BLOCK_VALUE (func),
do_print_variable_and_value, &cb_data);
+ /* do_print_variable_and_value invalidates FRAME. */
+ frame = NULL;
+
if (!cb_data.values_printed)
fprintf_filtered (stream, _("No arguments.\n"));
}
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.c b/gdb/testsuite/gdb.python/py-prettyprint.c
index 0ff7b33..1ff9e05 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.c
+++ b/gdb/testsuite/gdb.python/py-prettyprint.c
@@ -219,6 +219,22 @@ struct nullstr
struct string_repr string_1 = { { "one" } };
struct string_repr string_2 = { { "two" } };
+static int
+eval_func (int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8)
+{
+ return p1;
+}
+
+static void
+eval_sub (void)
+{
+ struct eval_type_s { int x; } eval1 = { 1 }, eval2 = { 2 }, eval3 = { 3 },
+ eval4 = { 4 }, eval5 = { 5 }, eval6 = { 6 },
+ eval7 = { 7 }, eval8 = { 8 }, eval9 = { 9 };
+
+ eval1.x++; /* eval-break */
+}
+
int
main ()
{
@@ -309,5 +325,7 @@ main ()
nstype2 = nstype;
+ eval_sub ();
+
return 0; /* break to inspect struct and union */
}
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index a6c241a..22af83c 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -123,14 +123,19 @@ if ![runto_main ] then {
return
}
-gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
- ".*Breakpoint.*"
-gdb_test "continue" ".*Breakpoint.*"
-
set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
gdb_test_no_output "python execfile ('${remote_python_file}')"
+gdb_breakpoint [gdb_get_line_number "eval-break"]
+gdb_continue_to_breakpoint "eval-break" ".* eval-break .*"
+
+gdb_test "info locals" "eval9 = eval=<123456789>"
+
+gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
+ ".*Breakpoint.*"
+gdb_test "continue" ".*Breakpoint.*"
+
gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>" \
"print ss enabled #1"
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.py b/gdb/testsuite/gdb.python/py-prettyprint.py
index 52ffd1a..b02b90f 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.py
+++ b/gdb/testsuite/gdb.python/py-prettyprint.py
@@ -199,6 +199,14 @@ class MemoryErrorString:
def display_hint (self):
return 'string'
+class pp_eval_type:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ gdb.execute("bt", to_string=True)
+ return "eval=<" + str(gdb.parse_and_eval("eval_func (123456789, 2, 3, 4, 5, 6, 7, 8)")) + ">"
+
def lookup_function (val):
"Look-up and return a pretty-printer that can print val."
@@ -276,6 +284,8 @@ def register_pretty_printers ():
pretty_printers_dict[re.compile ('^memory_error$')] = MemoryErrorString
+ pretty_printers_dict[re.compile ('^eval_type_s$')] = pp_eval_type
+
pretty_printers_dict = {}
register_pretty_printers ()

View File

@ -0,0 +1,55 @@
http://sourceware.org/ml/gdb-patches/2012-07/msg00200.html
Subject: [obv] testsuite: Fix fission-reread.S regression by me
Hi Doug,
I broke the testcase by patch
[patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs]
http://sourceware.org/ml/gdb-patches/2012-07/msg00009.html
The testcase itself usually PASSes but sometimes it does not. It is more
clear with 'readelf -wi':
<7b> DW_AT_frame_base : 97 byte block: 7a 0 1 7 19 8b 7e ac ce f1 22 90 2 fb 1 0 0 0 0 0 0 0 0 0 0 0 0 0 51 cd 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (DW_OP_breg10 (r10): 0; (Unknown location op))
Checked in.
Sorry,
Jan
http://sourceware.org/ml/gdb-cvs/2012-07/msg00102.html
--- src/gdb/testsuite/ChangeLog 2012/07/13 20:26:10 1.3292
+++ src/gdb/testsuite/ChangeLog 2012/07/15 08:34:55 1.3293
@@ -1,3 +1,9 @@
+2012-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix a testcase regression by me.
+ * gdb.dwarf2/fission-reread.S: Fix two DW_FORM_data8 to be
+ DW_FORM_data4.
+
2012-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
Doug Evans <dje@google.com>
--- src/gdb/testsuite/gdb.dwarf2/fission-reread.S 2012/07/02 20:10:48 1.3
+++ src/gdb/testsuite/gdb.dwarf2/fission-reread.S 2012/07/15 08:34:55 1.4
@@ -231,7 +231,7 @@
.uleb128 0x11 /* (DW_AT_low_pc) */
.uleb128 0x1 /* (DW_FORM_addr) */
.uleb128 0x12 /* (DW_AT_high_pc) */
- .uleb128 0x7 /* (DW_FORM_data8) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
.uleb128 0x10 /* (DW_AT_stmt_list) */
.uleb128 0x17 /* (DW_FORM_sec_offset) */
.uleb128 0x1b /* (DW_AT_comp_dir) */
@@ -351,7 +351,7 @@
.uleb128 0x11 /* (DW_AT_low_pc) */
.uleb128 0x1f01 /* (DW_FORM_GNU_addr_index) */
.uleb128 0x12 /* (DW_AT_high_pc) */
- .uleb128 0x7 /* (DW_FORM_data8) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
.uleb128 0x40 /* (DW_AT_frame_base) */
.uleb128 0x18 /* (DW_FORM_exprloc) */
.byte 0

View File

@ -30,12 +30,12 @@ Name: %{?scl_prefix}gdb
# Set version to contents of gdb/version.in. # Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3 # NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch). # and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
%global snap 20120703 %global snap 20120714
Version: 7.4.50.%{snap} Version: 7.4.50.%{snap}
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 13%{?dist} Release: 14%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers Group: Development/Debuggers
@ -479,10 +479,6 @@ Patch496: gdb-bz568248-oom-is-error.patch
#=push: There is different patch on gdb-patches, waiting now for resolution in kernel. #=push: There is different patch on gdb-patches, waiting now for resolution in kernel.
Patch504: gdb-bz623749-gcore-relro.patch Patch504: gdb-bz623749-gcore-relro.patch
# Fix lost siginfo_t in linux-nat (BZ 592031).
#=push
Patch511: gdb-bz592031-siginfo-lost-5of5.patch
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest #=fedoratest
Patch526: gdb-bz634108-solib_address.patch Patch526: gdb-bz634108-solib_address.patch
@ -552,10 +548,6 @@ Patch690: gdb-glibc-strstr-workaround.patch
#=fedora #=fedora
Patch694: gdb-disable-mcheck.patch Patch694: gdb-disable-mcheck.patch
# Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
#=push
Patch695: gdb-index-assert.patch
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
#=fedoratest #=fedoratest
#+ppc #+ppc
@ -565,14 +557,14 @@ Patch698: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
#=fedoratest #=fedoratest
Patch703: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch Patch703: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
# Revert function returning pointer fix (PR 9514) regressing Fedora errno patch.
#=push
Patch715: gdb-errno-func-datatype-revert.patch
# Implement MiniDebugInfo F-18 Feature consumer (Alexander Larsson, BZ 834068). # Implement MiniDebugInfo F-18 Feature consumer (Alexander Larsson, BZ 834068).
#=fedora #=fedora
Patch716: gdb-minidebuginfo.patch Patch716: gdb-minidebuginfo.patch
# Fix another stale frame_info * (PR 11914, like PR 13866).
#=push
Patch718: gdb-stale-frame_info-python.patch
%if 0%{!?rhel:1} || 0%{?rhel} > 6 %if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for: # RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch # Patch642: gdb-readline62-ask-more-rh.patch
@ -760,7 +752,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch2 -p1 %patch2 -p1
%patch232 -p1 %patch232 -p1
%patch715 -p1
%patch349 -p1 %patch349 -p1
%patch1 -p1 %patch1 -p1
%patch3 -p1 %patch3 -p1
@ -850,7 +841,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch491 -p1 %patch491 -p1
%patch496 -p1 %patch496 -p1
%patch504 -p1 %patch504 -p1
%patch511 -p1
%patch526 -p1 %patch526 -p1
%patch542 -p1 %patch542 -p1
%patch547 -p1 %patch547 -p1
@ -866,10 +856,10 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch661 -p1 %patch661 -p1
%patch690 -p1 %patch690 -p1
%patch694 -p1 %patch694 -p1
%patch695 -p1
%patch698 -p1 %patch698 -p1
%patch703 -p1 %patch703 -p1
%patch716 -p1 %patch716 -p1
%patch718 -p1
%patch393 -p1 %patch393 -p1
%if 0%{!?el5:1} || 0%{?scl:1} %if 0%{!?el5:1} || 0%{?scl:1}
@ -1364,6 +1354,11 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog %changelog
* Sun Jul 15 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120714-14.fc18
- Rebase to FSF GDB 7.4.50.20120714.
- Fix entryval feature crash on some .debug files optimized by dwz (BZ 839596).
- Fix another stale frame_info * (PR 11914, like PR 13866).
* Fri Jul 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120703-13.fc18 * Fri Jul 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120703-13.fc18
- [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068). - [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068).

View File

@ -1,2 +1,2 @@
04e5c4b1b9e633422cc48990fe61958d libstdc++-v3-python-r155978.tar.bz2 04e5c4b1b9e633422cc48990fe61958d libstdc++-v3-python-r155978.tar.bz2
91290d1034013db1fe035c081adde514 gdb-7.4.50.20120703.tar.bz2 115a6a521aef2ce306fd3e7fadd79c02 gdb-7.4.50.20120714.tar.bz2