aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-06-14 21:57:42 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-06-15 21:39:03 +0100
commitafda45a206f83389782a400f86668714400a1cb7 (patch)
treebfd09d887151732595c2cc6a8d57629019bb1088 /gdb/source.c
parent09e4c4e1f1732ed978db4b8c75877bf8a8097ae9 (diff)
downloadgdb-afda45a206f83389782a400f86668714400a1cb7.zip
gdb-afda45a206f83389782a400f86668714400a1cb7.tar.gz
gdb-afda45a206f83389782a400f86668714400a1cb7.tar.bz2
gdb: Remove unused parameter
The parameter 'fullname' is always passed as NULL to the function get_filename_and_charpos in source.c, so lets remove the parameter. There should be no user visible changes after this commit. gdb/ChangeLog: * source.c (get_filename_and_charpos): Remove fullname parameter. (identify_source_line): Update call to get_filename_and_charpos.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 02df15a..5fa55e2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1201,17 +1201,11 @@ find_source_lines (struct symtab *s, int desc)
or to 0 if the file is not found. */
static void
-get_filename_and_charpos (struct symtab *s, char **fullname)
+get_filename_and_charpos (struct symtab *s)
{
scoped_fd desc = open_source_file (s);
if (desc.get () < 0)
- {
- if (fullname)
- *fullname = NULL;
- return;
- }
- if (fullname)
- *fullname = s->fullname;
+ return;
if (s->line_charpos == 0)
find_source_lines (s, desc.get ());
}
@@ -1223,7 +1217,7 @@ identify_source_line (struct symtab *s, int line, int mid_statement,
CORE_ADDR pc)
{
if (s->line_charpos == 0)
- get_filename_and_charpos (s, (char **) NULL);
+ get_filename_and_charpos (s);
if (s->fullname == 0)
return 0;
if (line > s->nlines)