gdb/
Code cleanup. * dwarf2read.c (fixup_go_packaging): Do not check symtab->FILENAME for NULL. * linespec.c (add_sal_to_sals): Likewise. * psympriv.h (allocate_psymtab): Add ATTRIBUTE_NONNULL. * stack.c (print_frame): Do not check symtab->FILENAME for NULL. * symfile.h (allocate_symtab): Add ATTRIBUTE_NONNULL. * symtab.h (struct symtab): Add comment it is never NULL for filename. * tracepoint.c (set_traceframe_context): Do not check symtab->FILENAME for NULL. * tui/tui-source.c (tui_set_source_content): Likewise.
This commit is contained in:
parent
858174054d
commit
4e04028d95
9 changed files with 24 additions and 10 deletions
|
@ -1,3 +1,17 @@
|
||||||
|
2012-12-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Code cleanup.
|
||||||
|
* dwarf2read.c (fixup_go_packaging): Do not check symtab->FILENAME for
|
||||||
|
NULL.
|
||||||
|
* linespec.c (add_sal_to_sals): Likewise.
|
||||||
|
* psympriv.h (allocate_psymtab): Add ATTRIBUTE_NONNULL.
|
||||||
|
* stack.c (print_frame): Do not check symtab->FILENAME for NULL.
|
||||||
|
* symfile.h (allocate_symtab): Add ATTRIBUTE_NONNULL.
|
||||||
|
* symtab.h (struct symtab): Add comment it is never NULL for filename.
|
||||||
|
* tracepoint.c (set_traceframe_context): Do not check symtab->FILENAME
|
||||||
|
for NULL.
|
||||||
|
* tui/tui-source.c (tui_set_source_content): Likewise.
|
||||||
|
|
||||||
2012-12-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2012-12-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
|
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
|
||||||
|
|
|
@ -6733,7 +6733,6 @@ fixup_go_packaging (struct dwarf2_cu *cu)
|
||||||
complaint (&symfile_complaints,
|
complaint (&symfile_complaints,
|
||||||
_("Symtab %s has objects from two different Go packages: %s and %s"),
|
_("Symtab %s has objects from two different Go packages: %s and %s"),
|
||||||
(SYMBOL_SYMTAB (sym)
|
(SYMBOL_SYMTAB (sym)
|
||||||
&& SYMBOL_SYMTAB (sym)->filename
|
|
||||||
? SYMBOL_SYMTAB (sym)->filename
|
? SYMBOL_SYMTAB (sym)->filename
|
||||||
: cu->objfile->name),
|
: cu->objfile->name),
|
||||||
this_package_name, package_name);
|
this_package_name, package_name);
|
||||||
|
|
|
@ -852,7 +852,7 @@ add_sal_to_sals (struct linespec_state *self,
|
||||||
|
|
||||||
self->canonical_names = xrealloc (self->canonical_names,
|
self->canonical_names = xrealloc (self->canonical_names,
|
||||||
sals->nelts * sizeof (char *));
|
sals->nelts * sizeof (char *));
|
||||||
if (!literal_canonical && sal->symtab && sal->symtab->filename)
|
if (!literal_canonical && sal->symtab)
|
||||||
{
|
{
|
||||||
char *filename = sal->symtab->filename;
|
char *filename = sal->symtab->filename;
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,8 @@ extern struct partial_symtab *start_psymtab_common (struct objfile *,
|
||||||
struct partial_symbol **);
|
struct partial_symbol **);
|
||||||
|
|
||||||
extern struct partial_symtab *allocate_psymtab (const char *,
|
extern struct partial_symtab *allocate_psymtab (const char *,
|
||||||
struct objfile *);
|
struct objfile *)
|
||||||
|
ATTRIBUTE_NONNULL (1);
|
||||||
|
|
||||||
extern void discard_psymtab (struct objfile *, struct partial_symtab *);
|
extern void discard_psymtab (struct objfile *, struct partial_symtab *);
|
||||||
|
|
||||||
|
|
|
@ -1178,7 +1178,7 @@ print_frame (struct frame_info *frame, int print_level,
|
||||||
QUIT;
|
QUIT;
|
||||||
}
|
}
|
||||||
ui_out_text (uiout, ")");
|
ui_out_text (uiout, ")");
|
||||||
if (sal.symtab && sal.symtab->filename)
|
if (sal.symtab)
|
||||||
{
|
{
|
||||||
annotate_frame_source_begin ();
|
annotate_frame_source_begin ();
|
||||||
ui_out_wrap_hint (uiout, " ");
|
ui_out_wrap_hint (uiout, " ");
|
||||||
|
@ -1199,7 +1199,7 @@ print_frame (struct frame_info *frame, int print_level,
|
||||||
annotate_frame_source_end ();
|
annotate_frame_source_end ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pc_p && (!funname || (!sal.symtab || !sal.symtab->filename)))
|
if (pc_p && (funname == NULL || sal.symtab == NULL))
|
||||||
{
|
{
|
||||||
#ifdef PC_SOLIB
|
#ifdef PC_SOLIB
|
||||||
char *lib = PC_SOLIB (get_frame_pc (frame));
|
char *lib = PC_SOLIB (get_frame_pc (frame));
|
||||||
|
|
|
@ -454,7 +454,8 @@ extern struct symfile_segment_data *default_symfile_segments (bfd *abfd);
|
||||||
extern bfd_byte *default_symfile_relocate (struct objfile *objfile,
|
extern bfd_byte *default_symfile_relocate (struct objfile *objfile,
|
||||||
asection *sectp, bfd_byte *buf);
|
asection *sectp, bfd_byte *buf);
|
||||||
|
|
||||||
extern struct symtab *allocate_symtab (const char *, struct objfile *);
|
extern struct symtab *allocate_symtab (const char *, struct objfile *)
|
||||||
|
ATTRIBUTE_NONNULL (1);
|
||||||
|
|
||||||
extern void add_symtab_fns (const struct sym_fns *);
|
extern void add_symtab_fns (const struct sym_fns *);
|
||||||
|
|
||||||
|
|
|
@ -815,7 +815,7 @@ struct symtab
|
||||||
all the symtabs in a given compilation unit. */
|
all the symtabs in a given compilation unit. */
|
||||||
struct macro_table *macro_table;
|
struct macro_table *macro_table;
|
||||||
|
|
||||||
/* Name of this source file. */
|
/* Name of this source file. This pointer is never NULL. */
|
||||||
|
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
|
|
|
@ -312,8 +312,7 @@ set_traceframe_context (struct frame_info *trace_frame)
|
||||||
|
|
||||||
/* Save file name as "$trace_file", a debugger variable visible to
|
/* Save file name as "$trace_file", a debugger variable visible to
|
||||||
users. */
|
users. */
|
||||||
if (traceframe_sal.symtab == NULL
|
if (traceframe_sal.symtab == NULL)
|
||||||
|| traceframe_sal.symtab->filename == NULL)
|
|
||||||
clear_internalvar (lookup_internalvar ("trace_file"));
|
clear_internalvar (lookup_internalvar ("trace_file"));
|
||||||
else
|
else
|
||||||
set_internalvar_string (lookup_internalvar ("trace_file"),
|
set_internalvar_string (lookup_internalvar ("trace_file"),
|
||||||
|
|
|
@ -46,7 +46,7 @@ tui_set_source_content (struct symtab *s,
|
||||||
{
|
{
|
||||||
enum tui_status ret = TUI_FAILURE;
|
enum tui_status ret = TUI_FAILURE;
|
||||||
|
|
||||||
if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
|
if (s != (struct symtab *) NULL)
|
||||||
{
|
{
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
int i, desc, c, line_width, nlines;
|
int i, desc, c, line_width, nlines;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue