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>
+
+ 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>
* breakpoint.c (breakpoint_re_set): Remove the skip_re_set call.
complaint (&symfile_complaints,
_("Symtab %s has objects from two different Go packages: %s and %s"),
(SYMBOL_SYMTAB (sym)
- && SYMBOL_SYMTAB (sym)->filename
? SYMBOL_SYMTAB (sym)->filename
: cu->objfile->name),
this_package_name, package_name);
self->canonical_names = xrealloc (self->canonical_names,
sals->nelts * sizeof (char *));
- if (!literal_canonical && sal->symtab && sal->symtab->filename)
+ if (!literal_canonical && sal->symtab)
{
char *filename = sal->symtab->filename;
struct partial_symbol **);
extern struct partial_symtab *allocate_psymtab (const char *,
- struct objfile *);
+ struct objfile *)
+ ATTRIBUTE_NONNULL (1);
extern void discard_psymtab (struct objfile *, struct partial_symtab *);
QUIT;
}
ui_out_text (uiout, ")");
- if (sal.symtab && sal.symtab->filename)
+ if (sal.symtab)
{
annotate_frame_source_begin ();
ui_out_wrap_hint (uiout, " ");
annotate_frame_source_end ();
}
- if (pc_p && (!funname || (!sal.symtab || !sal.symtab->filename)))
+ if (pc_p && (funname == NULL || sal.symtab == NULL))
{
#ifdef PC_SOLIB
char *lib = PC_SOLIB (get_frame_pc (frame));
extern bfd_byte *default_symfile_relocate (struct objfile *objfile,
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 *);
all the symtabs in a given compilation unit. */
struct macro_table *macro_table;
- /* Name of this source file. */
+ /* Name of this source file. This pointer is never NULL. */
char *filename;
/* Save file name as "$trace_file", a debugger variable visible to
users. */
- if (traceframe_sal.symtab == NULL
- || traceframe_sal.symtab->filename == NULL)
+ if (traceframe_sal.symtab == NULL)
clear_internalvar (lookup_internalvar ("trace_file"));
else
set_internalvar_string (lookup_internalvar ("trace_file"),
{
enum tui_status ret = TUI_FAILURE;
- if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
+ if (s != (struct symtab *) NULL)
{
FILE *stream;
int i, desc, c, line_width, nlines;