public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-ambiguous-linespec: properly handle relative linespecs
@ 2011-10-14 21:01 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-10-14 21:01 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-ambiguous-linespec has been updated
       via  6bdad150ec578988fe850ed24edb10256db2f506 (commit)
      from  2274ca2b042e74d7abd34d7ecc48f24c4f33513b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 6bdad150ec578988fe850ed24edb10256db2f506
Author: Tom Tromey <tromey@redhat.com>
Date:   Fri Oct 14 14:59:48 2011 -0600

    properly handle relative linespecs

-----------------------------------------------------------------------

Summary of changes:
 gdb/linespec.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 2332938..178e5bd 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2221,6 +2221,7 @@ decode_all_digits (struct linespec_state *self,
   struct symtab_and_line val;
   int ix;
   struct symtab *elt;
+  int use_default = 0;
 
   enum sign
     {
@@ -2269,6 +2270,7 @@ decode_all_digits (struct linespec_state *self,
       initialize_defaults (&self->default_symtab, &self->default_line);
       VEC_pop (symtab_p, self->file_symtabs);
       VEC_safe_push (symtab_p, self->file_symtabs, self->default_symtab);
+      use_default = 1;
     }
 
   if (**argptr == '+')
@@ -2281,13 +2283,13 @@ decode_all_digits (struct linespec_state *self,
     case plus:
       if (q == *argptr)
 	val.line = 5;
-      if (self->file_symtabs == 0)
+      if (use_default)
 	val.line = self->default_line + val.line;
       break;
     case minus:
       if (q == *argptr)
 	val.line = 15;
-      if (self->file_symtabs == 0)
+      if (use_default)
 	val.line = self->default_line - val.line;
       else
 	val.line = 1;


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-14 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-14 21:01 [SCM] archer-tromey-ambiguous-linespec: properly handle relative linespecs 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).