mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00
Modified Files:
ChangeLog os9kread.c remote-os9k.c * os9kread.c (record_minmal_symbol): add section_offset to relocate minimal symbol table. * os9kread.c (read_minimal_symbols): ditto. * os9kread.c (os9k_symfile_init): increase size of dbg and stb file names. * os9kread.c (read_os9k_psymtab): if there's no dbg file, just return. Also if file addr is 0 leave it 0, not to relocate. * remote-os9k.c (_initialize_remote_os9k): add 'set remotexon', 'set remotexoff' and 'set remotelog' commands.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
Tue Mar 29 16:06:01 1994 Kung Hsu (kung@mexican.cygnus.com)
|
||||||
|
|
||||||
|
* os9kread.c (record_minmal_symbol): add section_offset to
|
||||||
|
relocate minimal symbol table.
|
||||||
|
* os9kread.c (read_minimal_symbols): ditto.
|
||||||
|
* os9kread.c (os9k_symfile_init): increase size of dbg and stb
|
||||||
|
file names.
|
||||||
|
* os9kread.c (read_os9k_psymtab): if there's no dbg file, just
|
||||||
|
return. Also if file addr is 0 leave it 0, not to relocate.
|
||||||
|
* remote-os9k.c (_initialize_remote_os9k): add 'set remotexon',
|
||||||
|
'set remotexoff' and 'set remotelog' commands.
|
||||||
|
|
||||||
Tue Mar 29 12:38:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Tue Mar 29 12:38:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* remote.c (remote_store_registers): Add 'P' request to set an
|
* remote.c (remote_store_registers): Add 'P' request to set an
|
||||||
|
@ -181,7 +181,8 @@ os9k_end_psymtab PARAMS ((struct partial_symtab *, char **, int, int, CORE_ADDR,
|
|||||||
struct partial_symtab **, int));
|
struct partial_symtab **, int));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
record_minimal_symbol PARAMS ((char *, CORE_ADDR, int, struct objfile *));
|
record_minimal_symbol PARAMS ((char *, CORE_ADDR, int, struct objfile *,
|
||||||
|
struct section_offsets *));
|
||||||
|
|
||||||
#define HANDLE_RBRAC(val) \
|
#define HANDLE_RBRAC(val) \
|
||||||
if ((val) > pst->texthigh) pst->texthigh = (val);
|
if ((val) > pst->texthigh) pst->texthigh = (val);
|
||||||
@ -207,23 +208,38 @@ record_minimal_symbol PARAMS ((char *, CORE_ADDR, int, struct objfile *));
|
|||||||
#define N_ABS 6
|
#define N_ABS 6
|
||||||
|
|
||||||
static void
|
static void
|
||||||
record_minimal_symbol (name, address, type, objfile)
|
record_minimal_symbol (name, address, type, objfile, section_offsets)
|
||||||
char *name;
|
char *name;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
int type;
|
int type;
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
|
struct section_offsets *section_offsets;
|
||||||
{
|
{
|
||||||
enum minimal_symbol_type ms_type;
|
enum minimal_symbol_type ms_type;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case N_TEXT: ms_type = mst_text; break;
|
case N_TEXT:
|
||||||
case N_DATA: ms_type = mst_data; break;
|
ms_type = mst_text;
|
||||||
case N_BSS: ms_type = mst_bss; break;
|
address += ANOFFSET(section_offsets, SECT_OFF_TEXT);
|
||||||
case N_RDATA: ms_type = mst_bss; break;
|
break;
|
||||||
case N_IDATA: ms_type = mst_data; break;
|
case N_DATA:
|
||||||
case N_ABS: ms_type = mst_abs; break;
|
ms_type = mst_data;
|
||||||
default: ms_type = mst_unknown; break;
|
break;
|
||||||
|
case N_BSS:
|
||||||
|
ms_type = mst_bss;
|
||||||
|
break;
|
||||||
|
case N_RDATA:
|
||||||
|
ms_type = mst_bss;
|
||||||
|
break;
|
||||||
|
case N_IDATA:
|
||||||
|
ms_type = mst_data;
|
||||||
|
break;
|
||||||
|
case N_ABS:
|
||||||
|
ms_type = mst_abs;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ms_type = mst_unknown; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
prim_record_minimal_symbol
|
prim_record_minimal_symbol
|
||||||
@ -250,8 +266,9 @@ struct stbsymbol {
|
|||||||
#define STBSYMSIZE 10
|
#define STBSYMSIZE 10
|
||||||
|
|
||||||
static int
|
static int
|
||||||
read_minimal_symbols(objfile)
|
read_minimal_symbols(objfile, section_offsets)
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
|
struct section_offsets *section_offsets;
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
@ -299,7 +316,7 @@ char buf[64], buf1[128];
|
|||||||
if (ch == 0) break;
|
if (ch == 0) break;
|
||||||
ch = getc(fp);
|
ch = getc(fp);
|
||||||
};
|
};
|
||||||
record_minimal_symbol(buf1, sym.value, sym.type&7, objfile);
|
record_minimal_symbol(buf1, sym.value, sym.type&7, objfile, section_offsets);
|
||||||
off += STBSYMSIZE;
|
off += STBSYMSIZE;
|
||||||
};
|
};
|
||||||
install_minimal_symbols (objfile);
|
install_minimal_symbols (objfile);
|
||||||
@ -337,7 +354,7 @@ os9k_symfile_read (objfile, section_offsets, mainline)
|
|||||||
back_to = make_cleanup (really_free_pendings, 0);
|
back_to = make_cleanup (really_free_pendings, 0);
|
||||||
|
|
||||||
make_cleanup (discard_minimal_symbols, 0);
|
make_cleanup (discard_minimal_symbols, 0);
|
||||||
read_minimal_symbols (objfile);
|
read_minimal_symbols (objfile, section_offsets);
|
||||||
|
|
||||||
/* Now that the symbol table data of the executable file are all in core,
|
/* Now that the symbol table data of the executable file are all in core,
|
||||||
process them and define symbols accordingly. */
|
process them and define symbols accordingly. */
|
||||||
@ -387,7 +404,7 @@ os9k_symfile_init (objfile)
|
|||||||
int val;
|
int val;
|
||||||
bfd *sym_bfd = objfile->obfd;
|
bfd *sym_bfd = objfile->obfd;
|
||||||
char *name = bfd_get_filename (sym_bfd);
|
char *name = bfd_get_filename (sym_bfd);
|
||||||
char dbgname[64], stbname[64];
|
char dbgname[512], stbname[512];
|
||||||
FILE *symfile = 0;
|
FILE *symfile = 0;
|
||||||
FILE *minfile = 0;
|
FILE *minfile = 0;
|
||||||
|
|
||||||
@ -633,6 +650,7 @@ read_os9k_psymtab (section_offsets, objfile, text_addr, text_size)
|
|||||||
|
|
||||||
abfd = objfile->obfd;
|
abfd = objfile->obfd;
|
||||||
fp = objfile->auxf2;
|
fp = objfile->auxf2;
|
||||||
|
if (!fp) return;
|
||||||
|
|
||||||
fread(&dbghdr.sync, sizeof(dbghdr.sync), 1, fp);
|
fread(&dbghdr.sync, sizeof(dbghdr.sync), 1, fp);
|
||||||
fread(&dbghdr.rev, sizeof(dbghdr.rev), 1, fp);
|
fread(&dbghdr.rev, sizeof(dbghdr.rev), 1, fp);
|
||||||
@ -702,8 +720,9 @@ read_os9k_psymtab (section_offsets, objfile, text_addr, text_size)
|
|||||||
unsigned long valu;
|
unsigned long valu;
|
||||||
enum language tmp_language;
|
enum language tmp_language;
|
||||||
|
|
||||||
valu = CUR_SYMBOL_VALUE +
|
valu = CUR_SYMBOL_VALUE;
|
||||||
ANOFFSET (section_offsets, SECT_OFF_TEXT);
|
if (valu)
|
||||||
|
valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
|
||||||
past_first_source_file = 1;
|
past_first_source_file = 1;
|
||||||
|
|
||||||
if (psymfile_depth == 0) {
|
if (psymfile_depth == 0) {
|
||||||
|
@ -49,6 +49,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "gdb-stabs.h"
|
#include "gdb-stabs.h"
|
||||||
|
#include <termio.h>
|
||||||
|
|
||||||
#ifdef HAVE_TERMIO
|
#ifdef HAVE_TERMIO
|
||||||
# define TERMINAL struct termios
|
# define TERMINAL struct termios
|
||||||
@ -78,6 +79,8 @@ static int rombug_is_open = 0;
|
|||||||
#define LOG_FILE "monitor.log"
|
#define LOG_FILE "monitor.log"
|
||||||
FILE *log_file;
|
FILE *log_file;
|
||||||
static int monitor_log = 0;
|
static int monitor_log = 0;
|
||||||
|
static int tty_xon = 0;
|
||||||
|
static int tty_xoff = 0;
|
||||||
|
|
||||||
static int timeout = 5;
|
static int timeout = 5;
|
||||||
static int is_trace_mode = 0;
|
static int is_trace_mode = 0;
|
||||||
@ -339,6 +342,15 @@ rombug_open(args, from_tty)
|
|||||||
perror_with_name ("RomBug");
|
perror_with_name ("RomBug");
|
||||||
}
|
}
|
||||||
SERIAL_RAW(monitor_desc);
|
SERIAL_RAW(monitor_desc);
|
||||||
|
if (tty_xon || tty_xoff)
|
||||||
|
{
|
||||||
|
struct hardware_ttystate { struct termios t;} *tty_s;
|
||||||
|
|
||||||
|
tty_s =(struct hardware_ttystate *)SERIAL_GET_TTY_STATE(monitor_desc);
|
||||||
|
if (tty_xon) tty_s->t.c_iflag |= IXON;
|
||||||
|
if (tty_xoff) tty_s->t.c_iflag |= IXOFF;
|
||||||
|
SERIAL_SET_TTY_STATE(monitor_desc, (serial_ttystate) tty_s);
|
||||||
|
}
|
||||||
|
|
||||||
rombug_is_open = 1;
|
rombug_is_open = 1;
|
||||||
|
|
||||||
@ -1164,12 +1176,25 @@ _initialize_remote_os9k ()
|
|||||||
&showlist);
|
&showlist);
|
||||||
|
|
||||||
add_show_from_set (
|
add_show_from_set (
|
||||||
add_set_cmd ("monitor_log", no_class, var_zinteger,
|
add_set_cmd ("remotelog", no_class, var_zinteger,
|
||||||
(char *) &monitor_log,
|
(char *) &monitor_log,
|
||||||
"Set monitor activity log on(=1) or off(=0).",
|
"Set monitor activity log on(=1) or off(=0).",
|
||||||
&setlist),
|
&setlist),
|
||||||
&showlist);
|
&showlist);
|
||||||
|
|
||||||
|
add_show_from_set (
|
||||||
|
add_set_cmd ("remotexon", no_class, var_zinteger,
|
||||||
|
(char *) &tty_xon,
|
||||||
|
"Set remote tty line XON control",
|
||||||
|
&setlist),
|
||||||
|
&showlist);
|
||||||
|
|
||||||
|
add_show_from_set (
|
||||||
|
add_set_cmd ("remotexoff", no_class, var_zinteger,
|
||||||
|
(char *) &tty_xoff,
|
||||||
|
"Set remote tty line XOFF control",
|
||||||
|
&setlist),
|
||||||
|
&showlist);
|
||||||
|
|
||||||
add_com ("rombug <command>", class_obscure, rombug_command,
|
add_com ("rombug <command>", class_obscure, rombug_command,
|
||||||
"Send a command to the debug monitor.");
|
"Send a command to the debug monitor.");
|
||||||
|
Reference in New Issue
Block a user