public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-ambiguous-linespec: make sure decode_indirect sets addr_string
@ 2011-10-13 17:36 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2011-10-13 17:36 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-ambiguous-linespec has been updated
via ff828e7bf22579b143cb46f068a0cd3da3d4610d (commit)
via 451c74125a34ad2a75b65e77ca911bf657a8491b (commit)
from a5fb3b491e5da5a235907a9cd4e6034d1e6756f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit ff828e7bf22579b143cb46f068a0cd3da3d4610d
Author: Tom Tromey <tromey@redhat.com>
Date: Thu Oct 13 11:35:47 2011 -0600
make sure decode_indirect sets addr_string
commit 451c74125a34ad2a75b65e77ca911bf657a8491b
Author: Tom Tromey <tromey@redhat.com>
Date: Thu Oct 13 07:39:49 2011 -0600
change line_info to ignore results from othe program spaces
-----------------------------------------------------------------------
Summary of changes:
gdb/linespec.c | 12 +++++++++---
gdb/source.c | 4 ++--
2 files changed, 11 insertions(+), 5 deletions(-)
First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index eecfb22..16091ce 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -120,7 +120,8 @@ struct collect_info
static void initialize_defaults (struct symtab **default_symtab,
int *default_line);
-static struct symtabs_and_lines decode_indirect (char **argptr);
+static struct symtabs_and_lines decode_indirect (struct linespec_state *self,
+ char **argptr);
static char *locate_first_half (char **argptr, int *is_quote_enclosed);
@@ -848,7 +849,7 @@ decode_line_internal (struct linespec_state *self, char **argptr)
if (**argptr == '*')
{
do_cleanups (cleanup);
- return decode_indirect (argptr);
+ return decode_indirect (self, argptr);
}
is_quoted = (strchr (get_gdb_completer_quote_characters (),
@@ -1167,6 +1168,7 @@ decode_line_full (char **argptr, int funfirstline,
result = decode_line_internal (&state, argptr);
gdb_assert (result.nelts == 1 || canonical->pre_expanded);
+ gdb_assert (canonical->addr_string != NULL);
canonical->pre_expanded = 1;
/* Fill in the missing canonical names. */
@@ -1281,10 +1283,11 @@ initialize_defaults (struct symtab **default_symtab, int *default_line)
/* Decode arg of the form *PC. */
static struct symtabs_and_lines
-decode_indirect (char **argptr)
+decode_indirect (struct linespec_state *self, char **argptr)
{
struct symtabs_and_lines values;
CORE_ADDR pc;
+ char *initial = *argptr;
(*argptr)++;
pc = value_as_address (parse_to_comma_and_eval (argptr));
@@ -1298,6 +1301,9 @@ decode_indirect (char **argptr)
values.sals[0].section = find_pc_overlay (pc);
values.sals[0].explicit_pc = 1;
+ if (self->canonical)
+ self->canonical->addr_string = savestring (initial, *argptr - initial);
+
return values;
}
diff --git a/gdb/source.c b/gdb/source.c
index f11c900..6911bbb 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1430,14 +1430,14 @@ line_info (char *arg, int from_tty)
}
cleanups = make_cleanup (xfree, sals.sals);
- save_current_program_space ();
/* C++ More than one line may have been specified, as when the user
specifies an overloaded function name. Print info on them all. */
for (i = 0; i < sals.nelts; i++)
{
sal = sals.sals[i];
- set_current_program_space (sal.pspace);
+ if (sal.pspace != current_program_space)
+ continue;
if (sal.symtab == 0)
{
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-13 17:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 17:36 [SCM] archer-tromey-ambiguous-linespec: make sure decode_indirect sets addr_string tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).