From 554d387d4cf36d63f004a5a10bee8d180a7af4e0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 4 Apr 2011 14:29:27 +0000 Subject: * xcoffread.c (read_xcoff_symtab): Make `debugfmt' const. * symtab.h (struct symtab) : Now const. * symmisc.c (free_symtab): Don't free debugformat. * buildsym.h (struct subfile) : Now const. (record_debugformat, record_producer): Document. * buildsym.c (end_symtab): Don't save debugformat and producer names on obstack. (end_symtab): Don't free debugformat and producer fields. (record_debugformat): Don't call xstrdup. (record_producer): Likewise. --- gdb/buildsym.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'gdb/buildsym.h') diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 37fe69c..ce1a9fc 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -70,8 +70,8 @@ struct subfile struct linetable *line_vector; int line_vector_length; enum language language; - char *producer; - char *debugformat; + const char *producer; + const char *debugformat; struct symtab *symtab; }; @@ -292,7 +292,15 @@ extern void record_pending_block (struct objfile *objfile, struct block *block, struct pending_block *opblock); -extern void record_debugformat (char *format); +/* Record the name of the debug format in the current pending symbol + table. FORMAT must be a string with a lifetime at least as long as + the symtab's objfile. */ + +extern void record_debugformat (const char *format); + +/* Record the name of the debuginfo producer (usually the compiler) in + the current pending symbol table. PRODUCER must be a string with a + lifetime at least as long as the symtab's objfile. */ extern void record_producer (const char *producer); -- cgit v1.1