mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* symfile.c (set_initial_language): Update.
(deduce_language_from_filename): Argument type now const. * symtab.h (find_main_filename): Update. (deduce_language_from_filename): Update. * symtab.c (find_main_filename): Make result const. * dwarf2read.c (dw2_find_symbol_file): Change return type. * psymtab.c (find_symbol_file_from_partial): Change return type. * symfile.h (struct quick_symbol_functions) <find_symbol_file>: Make result const.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
2010-07-13 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* symfile.c (set_initial_language): Update.
|
||||||
|
(deduce_language_from_filename): Argument type now const.
|
||||||
|
* symtab.h (find_main_filename): Update.
|
||||||
|
(deduce_language_from_filename): Update.
|
||||||
|
* symtab.c (find_main_filename): Make result const.
|
||||||
|
* dwarf2read.c (dw2_find_symbol_file): Change return type.
|
||||||
|
* psymtab.c (find_symbol_file_from_partial): Change return type.
|
||||||
|
* symfile.h (struct quick_symbol_functions) <find_symbol_file>:
|
||||||
|
Make result const.
|
||||||
|
|
||||||
2010-07-13 Tom Tromey <tromey@redhat.com>
|
2010-07-13 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (save_cmdlist): No longer static.
|
* breakpoint.c (save_cmdlist): No longer static.
|
||||||
|
@ -2150,7 +2150,7 @@ dw2_expand_symtabs_with_filename (struct objfile *objfile,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
dw2_find_symbol_file (struct objfile *objfile, const char *name)
|
dw2_find_symbol_file (struct objfile *objfile, const char *name)
|
||||||
{
|
{
|
||||||
struct dwarf2_per_cu_data *cu;
|
struct dwarf2_per_cu_data *cu;
|
||||||
@ -2176,8 +2176,7 @@ dw2_find_symbol_file (struct objfile *objfile, const char *name)
|
|||||||
if (!cu->v.quick->lines)
|
if (!cu->v.quick->lines)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return (char *) cu->v.quick->file_names[cu->v.quick->lines->num_file_names
|
return cu->v.quick->file_names[cu->v.quick->lines->num_file_names - 1];
|
||||||
- 1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -949,7 +949,7 @@ psymtab_to_fullname (struct partial_symtab *ps)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
find_symbol_file_from_partial (struct objfile *objfile, const char *name)
|
find_symbol_file_from_partial (struct objfile *objfile, const char *name)
|
||||||
{
|
{
|
||||||
struct partial_symtab *pst;
|
struct partial_symtab *pst;
|
||||||
|
@ -1538,7 +1538,7 @@ symbol_file_command (char *args, int from_tty)
|
|||||||
void
|
void
|
||||||
set_initial_language (void)
|
set_initial_language (void)
|
||||||
{
|
{
|
||||||
char *filename;
|
const char *filename;
|
||||||
enum language lang = language_unknown;
|
enum language lang = language_unknown;
|
||||||
|
|
||||||
filename = find_main_filename ();
|
filename = find_main_filename ();
|
||||||
@ -2665,7 +2665,7 @@ init_filename_language_table (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum language
|
enum language
|
||||||
deduce_language_from_filename (char *filename)
|
deduce_language_from_filename (const char *filename)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *cp;
|
char *cp;
|
||||||
|
@ -210,7 +210,7 @@ struct quick_symbol_functions
|
|||||||
|
|
||||||
/* Return the file name of the file holding the symbol in OBJFILE
|
/* Return the file name of the file holding the symbol in OBJFILE
|
||||||
named NAME. If no such symbol exists in OBJFILE, return NULL. */
|
named NAME. If no such symbol exists in OBJFILE, return NULL. */
|
||||||
char *(*find_symbol_file) (struct objfile *objfile, const char *name);
|
const char *(*find_symbol_file) (struct objfile *objfile, const char *name);
|
||||||
|
|
||||||
/* This method is specific to Ada. It walks the partial symbol
|
/* This method is specific to Ada. It walks the partial symbol
|
||||||
tables of OBJFILE looking for a name match. WILD_MATCH and
|
tables of OBJFILE looking for a name match. WILD_MATCH and
|
||||||
|
@ -1617,14 +1617,16 @@ basic_lookup_transparent_type (const char *name)
|
|||||||
/* FIXME: What about languages without main() or specially linked
|
/* FIXME: What about languages without main() or specially linked
|
||||||
executables that have no main() ? */
|
executables that have no main() ? */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
find_main_filename (void)
|
find_main_filename (void)
|
||||||
{
|
{
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
char *result, *name = main_name ();
|
char *name = main_name ();
|
||||||
|
|
||||||
ALL_OBJFILES (objfile)
|
ALL_OBJFILES (objfile)
|
||||||
{
|
{
|
||||||
|
const char *result;
|
||||||
|
|
||||||
if (!objfile->sf)
|
if (!objfile->sf)
|
||||||
continue;
|
continue;
|
||||||
result = objfile->sf->qf->find_symbol_file (objfile, name);
|
result = objfile->sf->qf->find_symbol_file (objfile, name);
|
||||||
|
@ -1136,7 +1136,7 @@ extern char **make_source_files_completion_list (char *, char *);
|
|||||||
|
|
||||||
int matching_obj_sections (struct obj_section *, struct obj_section *);
|
int matching_obj_sections (struct obj_section *, struct obj_section *);
|
||||||
|
|
||||||
extern char *find_main_filename (void);
|
extern const char *find_main_filename (void);
|
||||||
|
|
||||||
extern struct symtab *find_line_symtab (struct symtab *, int, int *, int *);
|
extern struct symtab *find_line_symtab (struct symtab *, int, int *, int *);
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ extern void skip_prologue_sal (struct symtab_and_line *);
|
|||||||
|
|
||||||
extern void clear_symtab_users (void);
|
extern void clear_symtab_users (void);
|
||||||
|
|
||||||
extern enum language deduce_language_from_filename (char *);
|
extern enum language deduce_language_from_filename (const char *);
|
||||||
|
|
||||||
/* symtab.c */
|
/* symtab.c */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user