Re: GDB 7.4 branching status? (2011-11-23)

Joel Brobecker
2011-11-29T03:22:29Z

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

This patch is optional, and related to the problem that got fixed
by your latest patch series, mentioned in my previous email:
http://www.sourceware.org/ml/gdb-patches/2011-11/msg00799.html

I still noticed a call to skip_prologue_sal without a check of
self->funfirstline.

Perhaps there is no situation where this might make a difference,
but I thought it might be good to add the check anyways, just
to be on the safe side.

--
Joel

[-- Attachment #2: 0004-call-skip_prologue_sal-only-if-self-funfirstline.patch --]
[-- Type: text/x-diff, Size: 1024 bytes --]

From abc12be76deaa5632094c1507f4dff284bd36c2b Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Mon, 28 Nov 2011 16:08:40 -0800
Subject: [PATCH 4/5] call skip_prologue_sal only if self->funfirstline

gdb/ChangeLog:

* linespec.c (decode_all_digits): Call skip_prologue_sal
only if self->funfirstline.
---
gdb/linespec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gdb/linespec.c b/gdb/linespec.c
index 06b1dd2..146163a 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2433,7 +2433,8 @@ decode_all_digits (struct linespec_state *self,

/* Make sure the line matches the request, not what was
found. */
- skip_prologue_sal (&intermediate_results.sals[i]);
+ if (self->funfirstline)
+ skip_prologue_sal (&intermediate_results.sals[i]);
intermediate_results.sals[i].line = val.line;
add_sal_to_sals (self, &values, &intermediate_results.sals[i],
sym ? SYMBOL_NATURAL_NAME (sym) : NULL);
--
1.7.1