From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: creating the gdb-7.4 branch tomorrow (?)
Date: Tue, 06 Dec 2011 18:53:00 -0000 [thread overview]
Message-ID: <m3ehwhmtsj.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20111205081911.GG28486@adacore.com> (Joel Brobecker's message of "Mon, 5 Dec 2011 09:19:11 +0100")
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
Here is patch #2, to make breakpoint->pspace optional.
It hasn't changed in a while, I'm sending it for completeness.
Tom
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch 2 --]
[-- Type: text/x-patch, Size: 3479 bytes --]
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f0a351f..a26c933 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5819,9 +5819,11 @@ init_raw_breakpoint (struct breakpoint *b, struct gdbarch *gdbarch,
if (bptype != bp_catchpoint)
gdb_assert (sal.pspace != NULL);
- /* Store the program space that was used to set the breakpoint, for
- breakpoint resetting. */
- b->pspace = sal.pspace;
+ /* Store the program space that was used to set the breakpoint,
+ except for ordinary breakpoints, which are independent of the
+ program space. */
+ if (bptype != bp_breakpoint && bptype != bp_hardware_breakpoint)
+ b->pspace = sal.pspace;
if (sal.symtab == NULL)
b->source_file = NULL;
@@ -7268,7 +7270,6 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
b->ignore_count = ignore_count;
b->enable_state = enabled ? bp_enabled : bp_disabled;
b->disposition = disposition;
- b->pspace = sals.sals[0].pspace;
if (type == bp_static_tracepoint)
{
@@ -8036,7 +8037,8 @@ create_breakpoint (struct gdbarch *gdbarch,
b->disposition = tempflag ? disp_del : disp_donttouch;
b->condition_not_parsed = 1;
b->enable_state = enabled ? bp_enabled : bp_disabled;
- b->pspace = current_program_space;
+ if (type_wanted != bp_breakpoint && type_wanted != bp_hardware_breakpoint)
+ b->pspace = current_program_space;
install_breakpoint (internal, b, 0);
}
@@ -10988,9 +10990,6 @@ static struct breakpoint_ops base_breakpoint_ops =
static void
bkpt_re_set (struct breakpoint *b)
{
- if (current_program_space->executing_startup)
- return;
-
/* FIXME: is this still reachable? */
if (b->addr_string == NULL)
{
@@ -11925,6 +11924,7 @@ addr_string_to_sals (struct breakpoint *b, char *addr_string, int *found)
if (e.error == NOT_FOUND_ERROR
&& (b->condition_not_parsed
|| (b->loc && b->loc->shlib_disabled)
+ || (b->loc && b->loc->pspace->executing_startup)
|| b->enable_state == bp_disabled))
not_found_and_ok = 1;
@@ -12013,7 +12013,8 @@ prepare_re_set_context (struct breakpoint *b)
input_radix = b->input_radix;
cleanups = save_current_space_and_thread ();
- switch_to_program_space_and_thread (b->pspace);
+ if (b->pspace != NULL)
+ switch_to_program_space_and_thread (b->pspace);
set_language (b->language);
return cleanups;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 17e65d6..de1491e 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -567,7 +567,9 @@ struct breakpoint
equals this. */
struct frame_id frame_id;
- /* The program space used to set the breakpoint. */
+ /* The program space used to set the breakpoint. This is only set
+ for breakpoints which are specific to a program space; for
+ ordinary breakpoints this is NULL. */
struct program_space *pspace;
/* String we used to set the breakpoint (malloc'd). */
diff --git a/gdb/elfread.c b/gdb/elfread.c
index a309a2c..067c77f 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1032,7 +1032,7 @@ elf_gnu_ifunc_resolver_return_stop (struct breakpoint *b)
}
gdb_assert (b->type == bp_gnu_ifunc_resolver);
- gdb_assert (current_program_space == b->pspace);
+ gdb_assert (current_program_space == b->pspace || b->pspace == NULL);
elf_gnu_ifunc_record_cache (b->addr_string, resolved_pc);
sal = find_pc_line (resolved_pc, 0);
--
1.7.6.4
next prev parent reply other threads:[~2011-12-06 18:53 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 8:19 Joel Brobecker
2011-12-06 18:45 ` Tom Tromey
2011-12-06 18:53 ` Tom Tromey [this message]
2011-12-06 18:54 ` Tom Tromey
2011-12-06 19:05 ` Tom Tromey
2011-12-06 19:05 ` Tom Tromey
2011-12-06 19:07 ` Tom Tromey
2011-12-06 19:10 ` Tom Tromey
2011-12-07 4:09 ` Hui Zhu
2011-12-07 9:54 ` Joel Brobecker
2011-12-07 16:24 ` Stan Shebs
2011-12-07 23:50 ` Stan Shebs
2011-12-08 8:22 ` Joel Brobecker
2011-12-07 9:11 ` Jan Kratochvil
2011-12-07 10:01 ` Joel Brobecker
2011-12-08 15:33 ` FYI: fixlet in ovsrch.exp (Was: creating the gdb-7.4 branch tomorrow (?)) Tom Tromey
2011-12-09 17:17 ` Regression for gdb.base/sigstep.exp with .debug_types [Re: creating the gdb-7.4 branch tomorrow (?)] Jan Kratochvil
2011-12-09 17:26 ` Regression for gdb.base/sigstep.exp with .debug_types Jan Kratochvil
2011-12-09 20:50 ` Tom Tromey
2011-12-09 21:55 ` Jan Kratochvil
2011-12-10 9:46 ` Tom Tromey
2011-12-10 19:27 ` [commit] testsuite: KFAIL gdb.cp/static-method.exp [Re: Regression for gdb.base/sigstep.exp with .debug_types] Jan Kratochvil
2011-12-11 9:26 ` Joel Brobecker
2011-12-11 12:42 ` Jan Kratochvil
2011-12-11 12:46 ` Joel Brobecker
2011-12-14 19:02 ` [patch] gcc KFAILs to XFAILs [Re: [commit] testsuite: KFAIL gdb.cp/static-method.exp] Jan Kratochvil
2011-12-14 19:43 ` Doug Evans
2011-12-14 19:51 ` [doc patch] gdbint: XFAIL vs. KFAIL [Re: [patch] gcc KFAILs to XFAILs] Jan Kratochvil
2011-12-15 5:33 ` Eli Zaretskii
2011-12-19 11:16 ` Jan Kratochvil
2011-12-19 13:41 ` Eli Zaretskii
2011-12-19 13:42 ` [commit] " Jan Kratochvil
2011-12-19 13:43 ` [commit] [patch] gcc KFAILs to XFAILs [Re: [commit] testsuite: KFAIL gdb.cp/static-method.exp] Jan Kratochvil
2011-12-09 20:17 ` Regression for gdb.base/sigstep.exp with .debug_types [Re: creating the gdb-7.4 branch tomorrow (?)] Tom Tromey
2011-12-09 20:20 ` Jan Kratochvil
2011-12-09 17:17 ` Crash regression for gdb.base/ending-run.exp " Jan Kratochvil
2011-12-09 19:05 ` Tom Tromey
2011-12-09 21:00 ` Jan Kratochvil
2011-12-14 11:52 ` creating the gdb-7.4 branch tomorrow (?) Andreas Schwab
2011-12-14 13:20 ` Joel Brobecker
2011-12-14 13:34 ` Andreas Schwab
2011-12-14 19:28 ` Joel Brobecker
2011-12-14 21:16 ` Andreas Schwab
2011-12-14 21:31 ` Joel Brobecker
2011-12-14 22:06 ` Andreas Schwab
2011-12-15 17:43 ` Tom Tromey
2012-07-22 19:41 ` Andreas Schwab
2012-08-15 19:34 ` Tom Tromey
2012-08-22 14:23 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ehwhmtsj.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox