aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1993-03-11 01:56:31 +0000
committerFred Fish <fnf@specifix.com>1993-03-11 01:56:31 +0000
commitf77ad50597b7c74ce8454346940dcfc65aba1dd5 (patch)
tree44e7ab514f237e231a7dcd3a64ff33fa7ba071a8 /gdb/symtab.c
parent6559fbdb527abbf1a64ab4524693bab9daf3e305 (diff)
downloadgdb-f77ad50597b7c74ce8454346940dcfc65aba1dd5.zip
gdb-f77ad50597b7c74ce8454346940dcfc65aba1dd5.tar.gz
gdb-f77ad50597b7c74ce8454346940dcfc65aba1dd5.tar.bz2
* main.c (source_command): Require an explicit pathname of file
to source, since previous behavior of defaulting to gdb init file was troublesome and undocumented. * printcmd.c (disassemble_command): Add missing '{}' pair to else with two statements. Bug reported by Stephane Tsacas <slt@isoft.fr>. * symtab.c (find_pc_line): Don't complain about zero length or negative length line numbers for the moment, since we may not own the terminal when called, such as when single stepping. (FIXME) * language.h (CAST_IS_CONVERSION): True if current language is C++ as well as C. Fix from Peter Schauer. * environ.c (get_in_environ, set_in_environ, unset_in_environ): Use STREQN macro rather than bare '!strncmp()'. * environ.c (unset_in_environ): Avoid use of memcpy on overlapping memory regions, as suggested by Paul Eggert <eggert@twinsun.com>. * c-exp.y (%union struct): Remove unused ulval as suggested by Paul Eggert <eggert@twinsun.com>.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5a371ae..328679c 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -959,6 +959,13 @@ find_pc_symtab (pc)
range, we must search all symtabs associated with this compilation unit, and
find the one whose first PC is closer than that of the next line in this
symtab.
+
+ FIXME: We used to complain here about zero length or negative length line
+ tables, but there are two problems with this: (1) some symtabs may not have
+ any line numbers due to gcc -g1 compilation, and (2) this function is called
+ during single stepping, when we don't own the terminal and thus can't
+ produce any output. One solution might be to implement a mechanism whereby
+ complaints can be queued until we regain control of the terminal. -fnf
*/
struct symtab_and_line
@@ -1023,10 +1030,8 @@ find_pc_line (pc, notcurrent)
if (!l)
continue;
len = l->nitems;
- if (len <= 0)
+ if (len <= 0) /* See FIXME above. */
{
- fprintf (stderr, "Inconsistent line number info for %s\n",
- s->filename);
continue;
}
@@ -2405,8 +2410,7 @@ static char **return_val;
#define COMPLETION_LIST_ADD_SYMBOL(symbol, text, len) \
do { \
completion_list_add_name (SYMBOL_NAME (symbol), text, len); \
- if (SYMBOL_LANGUAGE (symbol) == language_cplus && \
- SYMBOL_DEMANGLED_NAME (symbol) != NULL) \
+ if (SYMBOL_DEMANGLED_NAME (symbol) != NULL) \
completion_list_add_name (SYMBOL_DEMANGLED_NAME (symbol), text, len); \
} while (0)