summaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 16:44:44 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 16:44:44 +0000
commit694f471701aa8adac8f09a31bc713397bdb315bf (patch)
tree8c1805fa5d9c6a1c8696f149e8c588e021a91839 /gdb/objfiles.h
parent775f009526211c189caf7d39f6210f87264e7eff (diff)
downloadgdb-694f471701aa8adac8f09a31bc713397bdb315bf.tar.gz
* jit.c (jit_object_close_impl): Don't malloc the objfile
name. * objfiles.c (allocate_objfile): Don't malloc the objfile name. (free_objfile): Don't free the objfile name. * objfiles.h (struct objfile) <name>: Update comment. * symfile.c (reread_symbols): Fix reference counting. Don't malloc objfile name.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 24124fee0fc..304f935d1e7 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -197,8 +197,9 @@ struct objfile
struct objfile *next;
- /* The object file's name, tilde-expanded and absolute. Malloc'd; free it
- if you free this struct. This pointer is never NULL. */
+ /* The object file's name, tilde-expanded and absolute. This
+ pointer is never NULL. This does not have to be freed; it is
+ guaranteed to have a lifetime at least as long as the objfile. */
char *name;