mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Modified Files:
ChangeLog objfiles.c objfiles.h symfile.c target.c main.c
Makefile.in configure.in
Added Files:
os9kread.c os9kstab.c remote-os9k.c
* os9kread.c: New file to read os9000 style symbo table.
* os9kstab.c: new file to read os9000 style stabs.
* remote-os9k.c: remote protocol talking to os9000 rombug monitor.
* objfiles.c (find_pc_objfile): new function to search objfile
from pc.
* objfiles.c (objfile_relocate_data): new function to relocate
data symbols in symbol table.
* objfiles.h: Add two aux fields in struct objfile to handle
multiple symbol table files situation like in os9000.
* symfile.c: Change so 'symbol-file' command can handle multiple
files. Also call target_link() to get relocation infos.
* target.c (target_link): new function to get relocation info when
a symbol file is requested to load.
* main.c (quit_command): take out 'inferior_pid != 0' condition,
because in cross mode there's no inferior pid, bit they need to
be detached.
Makefile.in: add os9kread.c os9kstab.c and .o's.
configure.in: add i386os9k target.
config/i386/i386os9k.mt: new add.
config/i386/tm-i386os9k.h: new add.
This commit is contained in:
@@ -48,7 +48,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#endif
|
||||
|
||||
/* Global variables owned by this file */
|
||||
|
||||
CORE_ADDR text_relocation = 0; /* text_relocation */
|
||||
int readnow_symbol_files; /* Read full symbols immediately */
|
||||
|
||||
struct complaint oldsyms_complaint = {
|
||||
@@ -675,7 +675,23 @@ symbol_file_command (args, from_tty)
|
||||
}
|
||||
else
|
||||
{
|
||||
char *p;
|
||||
|
||||
name = *argv;
|
||||
|
||||
/* this is for rombug remote only, to get the text relocation by
|
||||
using link command */
|
||||
p = strrchr(name, '/');
|
||||
if (p != NULL) p++;
|
||||
else p = name;
|
||||
|
||||
target_link(p, &text_relocation);
|
||||
|
||||
if (text_relocation)
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR)text_relocation, 0, mapped, readnow);
|
||||
else
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, mapped, readnow);
|
||||
set_initial_language ();
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
@@ -684,11 +700,6 @@ symbol_file_command (args, from_tty)
|
||||
{
|
||||
error ("no symbol file name was specified");
|
||||
}
|
||||
else
|
||||
{
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, mapped, readnow);
|
||||
set_initial_language ();
|
||||
}
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
}
|
||||
@@ -972,14 +983,23 @@ add_symbol_file_command (args, from_tty)
|
||||
left pointing at the remainder of the command line, which should
|
||||
be the address expression to evaluate. */
|
||||
|
||||
if ((name == NULL) || (*args == '\000') )
|
||||
if (name == NULL)
|
||||
{
|
||||
error ("add-symbol-file takes a file name and an address");
|
||||
error ("add-symbol-file takes a file name");
|
||||
}
|
||||
name = tilde_expand (name);
|
||||
make_cleanup (free, name);
|
||||
|
||||
text_addr = parse_and_eval_address (args);
|
||||
if (*args != '\000')
|
||||
{
|
||||
text_addr = parse_and_eval_address (args);
|
||||
}
|
||||
else
|
||||
{
|
||||
target_link(name, &text_addr);
|
||||
if (text_addr == (CORE_ADDR)-1)
|
||||
error("Don't know how to get text start location for this file");
|
||||
}
|
||||
|
||||
/* FIXME-32x64: Assumes text_addr fits in a long. */
|
||||
if (!query ("add symbol table from file \"%s\" at text_addr = %s?\n",
|
||||
@@ -1078,10 +1098,12 @@ reread_symbols ()
|
||||
if (objfile->global_psymbols.list)
|
||||
mfree (objfile->md, objfile->global_psymbols.list);
|
||||
objfile->global_psymbols.list = NULL;
|
||||
objfile->global_psymbols.next = NULL;
|
||||
objfile->global_psymbols.size = 0;
|
||||
if (objfile->static_psymbols.list)
|
||||
mfree (objfile->md, objfile->static_psymbols.list);
|
||||
objfile->static_psymbols.list = NULL;
|
||||
objfile->static_psymbols.next = NULL;
|
||||
objfile->static_psymbols.size = 0;
|
||||
|
||||
/* Free the obstacks for non-reusable objfiles */
|
||||
|
||||
Reference in New Issue
Block a user