aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2012-07-23 20:40:07 +0000
committerKeith Seitz <keiths@redhat.com>2012-07-23 20:40:07 +0000
commit64b92e45d3066b83d0cabfd361c77956eed9f884 (patch)
tree01b86ed1baceee5c565736689ca5f67f9573068c
parent0f5f4ffe7a8025a0cfb16b9a71c8c7347280bc5e (diff)
downloadgdb-64b92e45d3066b83d0cabfd361c77956eed9f884.zip
gdb-64b92e45d3066b83d0cabfd361c77956eed9f884.tar.gz
gdb-64b92e45d3066b83d0cabfd361c77956eed9f884.tar.bz2
* linespec.c (convert_linespec_to_sal): Don't add
any symbols to the result vector if symbol_to_sal returns zero.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/linespec.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3449cc6..4f756ad 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2012-07-23 Keith Seitz <keiths@redhat.com>
+ * linespec.c (convert_linespec_to_sal): Don't add
+ any symbols to the result vector if symbol_to_sal
+ returns zero.
+
+2012-07-23 Keith Seitz <keiths@redhat.com>
+
* linespec.c (decode_objc): Record the function name
in the linespec.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 9bc2dbe..e85be68 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1860,9 +1860,9 @@ convert_linespec_to_sals (struct linespec_state *state, linespec_p ls)
for (i = 0; VEC_iterate (symbolp, ls->labels.label_symbols, i, sym); ++i)
{
- symbol_to_sal (&sal, state->funfirstline, sym);
- add_sal_to_sals (state, &sals, &sal,
- SYMBOL_NATURAL_NAME (sym), 0);
+ if (symbol_to_sal (&sal, state->funfirstline, sym))
+ add_sal_to_sals (state, &sals, &sal,
+ SYMBOL_NATURAL_NAME (sym), 0);
}
}
else if (ls->function_symbols != NULL || ls->minimal_symbols != NULL)
@@ -1886,8 +1886,8 @@ convert_linespec_to_sals (struct linespec_state *state, linespec_p ls)
{
pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
set_current_program_space (pspace);
- symbol_to_sal (&sal, state->funfirstline, sym);
- if (maybe_add_address (state->addr_set, pspace, sal.pc))
+ if (symbol_to_sal (&sal, state->funfirstline, sym)
+ && maybe_add_address (state->addr_set, pspace, sal.pc))
add_sal_to_sals (state, &sals, &sal,
SYMBOL_NATURAL_NAME (sym), 0);
}