aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-07-06 18:23:47 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-07-06 18:23:47 +0000
commite23578923827cd7506e82b255fb0ed3839b880f2 (patch)
tree207b0e960c602b469647703a1f807f4d0ab7aafe
parentc8450da85c70275a0d6c414df4d732f2bd97f8d2 (diff)
downloadgdb-e23578923827cd7506e82b255fb0ed3839b880f2.zip
gdb-e23578923827cd7506e82b255fb0ed3839b880f2.tar.gz
gdb-e23578923827cd7506e82b255fb0ed3839b880f2.tar.bz2
gdb/
* source.c (find_and_open_source): Remove the `objfile' parameter. Update the function comment. (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the find_and_open_source callers.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/source.c18
2 files changed, 13 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 412ac3a..91480ff 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * source.c (find_and_open_source): Remove the `objfile' parameter.
+ Update the function comment.
+ (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
+ find_and_open_source callers.
+
2009-07-05 Pedro Alves <pedro@codesourcery.com>
* coff-pe-read.c (read_pe_exported_syms): Recognize
diff --git a/gdb/source.c b/gdb/source.c
index d534ab3..c40a5aa 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -922,11 +922,9 @@ rewrite_source_path (const char *path)
}
/* This function is capable of finding the absolute path to a
- source file, and opening it, provided you give it an
- OBJFILE and FILENAME. Both the DIRNAME and FULLNAME are only
- added suggestions on where to find the file.
+ source file, and opening it, provided you give it a FILENAME. Both the
+ DIRNAME and FULLNAME are only added suggestions on where to find the file.
- OBJFILE should be the objfile associated with a psymtab or symtab.
FILENAME should be the filename to open.
DIRNAME is the compilation directory of a particular source file.
Only some debug formats provide this info.
@@ -944,8 +942,7 @@ rewrite_source_path (const char *path)
FULLNAME is set to NULL. */
static int
-find_and_open_source (struct objfile *objfile,
- const char *filename,
+find_and_open_source (const char *filename,
const char *dirname,
char **fullname)
{
@@ -1044,8 +1041,7 @@ open_source_file (struct symtab *s)
if (!s)
return -1;
- return find_and_open_source (s->objfile, s->filename, s->dirname,
- &s->fullname);
+ return find_and_open_source (s->filename, s->dirname, &s->fullname);
}
/* Finds the fullname that a symtab represents.
@@ -1065,8 +1061,7 @@ symtab_to_fullname (struct symtab *s)
/* Don't check s->fullname here, the file could have been
deleted/moved/..., look for it again */
- r = find_and_open_source (s->objfile, s->filename, s->dirname,
- &s->fullname);
+ r = find_and_open_source (s->filename, s->dirname, &s->fullname);
if (r >= 0)
{
@@ -1094,8 +1089,7 @@ psymtab_to_fullname (struct partial_symtab *ps)
/* Don't check ps->fullname here, the file could have been
deleted/moved/..., look for it again */
- r = find_and_open_source (ps->objfile, ps->filename, ps->dirname,
- &ps->fullname);
+ r = find_and_open_source (ps->filename, ps->dirname, &ps->fullname);
if (r >= 0)
{