gdb: Remove unused parameter
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 14 Jun 2019 20:57:42 +0000 (21:57 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 15 Jun 2019 20:39:03 +0000 (21:39 +0100)
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.

gdb/ChangeLog
gdb/source.c

index 702aa7fea4a40a70575cef9602ce92e105a605e6..83916efc63058301c994a9233fcd430bc2b6536c 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-15  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * source.c (get_filename_and_charpos): Remove fullname
+       parameter.
+       (identify_source_line): Update call to get_filename_and_charpos.
+
 2019-06-14  Tom Tromey  <tromey@adacore.com>
 
        PR gdb/24502:
index 02df15a1ae6c5dd704ec16bc97a8240435b3e1e3..5fa55e2c16023fb4cc6fcba4511f9e660ff621c4 100644 (file)
@@ -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)
This page took 0.031845 seconds and 4 git commands to generate.