diff options
author | John Gilmore <gnu@cygnus> | 1992-01-28 02:57:37 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-01-28 02:57:37 +0000 |
commit | c55e616795e1b472543b22ae5c67da86976f529b (patch) | |
tree | 7a112a21c1cb0a8fbb2f9ca964c437c168aa95a8 /gdb/putenv.c | |
parent | f005e85b88b980a7bf632f894fab61b597a05f1a (diff) | |
download | gdb-c55e616795e1b472543b22ae5c67da86976f529b.zip gdb-c55e616795e1b472543b22ae5c67da86976f529b.tar.gz gdb-c55e616795e1b472543b22ae5c67da86976f529b.tar.bz2 |
Handle debug symbols in dynamically loaded (relocated) code:
* dbxread.c (read_ofile_symtab): Fix up N_CATCH better. Pass
offset to process_one_symbol.
(process_one_symbol): Take new offset parameter. Add it into
appropriate symbol types to relocate symbols to loaded addresses.
Handle all possible symbol types, and complain() about types that
we don't expect to see.
* mipsread.c (psymtab_to_symtab_1): Pass offset of zero to
process_one_symbol (FIXME, should pass real offset).
Misc bugfixes:
* breakpoint.c (resolve_sal_pc): Split out code to resolve a
sal's PC value.
(set_breakpoint, break_command_1, until_break_command,
catch_command_1, breakpoint_re_set_one): Use it.
(breakpoint_re_set_one): Disable bkpts that don't re-set cleanly.
(breakpoint_re_set): Mention breakpoint number in error messages.
* symtab.h (resolve_sal_pc): Declare.
* infcmd.c (jump_command): Use resolve_sal_pc.
* source.c (find_source_lines): Avoid "Source file is more
recent than executable" when bfd_get_mtime gives 0.
(list_command): Shorten "FILE, line N" to "FILE:N".
* putenv.c (putenv): Avoid unportably casting pointers to unsigneds.
Diffstat (limited to 'gdb/putenv.c')
-rw-r--r-- | gdb/putenv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/putenv.c b/gdb/putenv.c index b9de9f0..15689e3 100644 --- a/gdb/putenv.c +++ b/gdb/putenv.c @@ -68,15 +68,17 @@ putenv( entry ) { unsigned length; unsigned size; + char *temp; char **p; char **new_environ; /* Find the length of the "NAME=" */ - if ( (length=(unsigned) index(entry,'=')) == 0 ) + temp = index(entry,'='); + if ( temp == 0 ) return( -1 ); - length = length - (unsigned) entry + 1; + length = (unsigned) (temp - entry + 1); /* Scan through the environment looking for "NAME=" */ @@ -95,7 +97,7 @@ putenv( entry ) new_environ = (char **) malloc( (size+2)*PSIZE ); - if ( new_environ == NULL ) + if ( new_environ == (char **) NULL ) return( -1 ); bcopy( (char *) environ, (char *) new_environ, size*PSIZE ); |