aboutsummaryrefslogtreecommitdiff
path: root/gdb/os9kread.c
diff options
context:
space:
mode:
authorKung Hsu <kung@cygnus>1994-04-22 21:36:59 +0000
committerKung Hsu <kung@cygnus>1994-04-22 21:36:59 +0000
commitd5336fc5a4a32554ea7e5fde89522f3f0e25ffb0 (patch)
tree1ade8f13fdfea5eaa991cf0d77d02a42a75b3ef1 /gdb/os9kread.c
parent988238d38052803c0b516b3f5da2301c1aa0acc2 (diff)
downloadgdb-d5336fc5a4a32554ea7e5fde89522f3f0e25ffb0.zip
gdb-d5336fc5a4a32554ea7e5fde89522f3f0e25ffb0.tar.gz
gdb-d5336fc5a4a32554ea7e5fde89522f3f0e25ffb0.tar.bz2
Modified Files:
ChangeLog remote-os9k.c os9kread.c stabsread.c * remote-os9k.c (rombug_fetch_registers): set trace mode correctly. * remote-os9k.c (rombug_read_inferior_memory): cache data in buffer. * os9kread,c (read_os9k_psymtab): process file symbol to truncate extra info. * os9kread.c (os9k_read_ofile_symtab): proper casting of args passed to process_one_symbol. * stabsread.c (read_type): process os9k functio prototype.
Diffstat (limited to 'gdb/os9kread.c')
-rw-r--r--gdb/os9kread.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 4a1f365..f1d7912 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -719,34 +719,43 @@ read_os9k_psymtab (section_offsets, objfile, text_addr, text_size)
{
unsigned long valu;
enum language tmp_language;
+ char *str, *p;
+ int n;
valu = CUR_SYMBOL_VALUE;
if (valu)
valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
past_first_source_file = 1;
+ p = strchr(namestring, ':');
+ if (p) n = p-namestring;
+ else n = strlen(namestring);
+ str = alloca(n+1);
+ strncpy(str, namestring, n);
+ str[n] = '\0';
+
if (psymfile_depth == 0) {
if (!pst)
pst = os9k_start_psymtab (objfile, section_offsets,
- namestring, valu,
+ str, valu,
cursymoffset,
symnum-1,
objfile -> global_psymbols.next,
objfile -> static_psymbols.next);
} else { /* this is a include file */
- tmp_language = deduce_language_from_filename (namestring);
+ tmp_language = deduce_language_from_filename (str);
if (tmp_language != language_unknown
&& (tmp_language != language_c
|| psymtab_language != language_cplus))
psymtab_language = tmp_language;
/*
- if (pst && STREQ (namestring, pst->filename))
+ if (pst && STREQ (str, pst->filename))
continue;
{
register int i;
for (i = 0; i < includes_used; i++)
- if (STREQ (namestring, psymtab_include_list[i]))
+ if (STREQ (str, psymtab_include_list[i]))
{
i = -1;
break;
@@ -756,7 +765,7 @@ read_os9k_psymtab (section_offsets, objfile, text_addr, text_size)
}
*/
- psymtab_include_list[includes_used++] = namestring;
+ psymtab_include_list[includes_used++] = str;
if (includes_used >= includes_allocated)
{
char **orig = psymtab_include_list;
@@ -1397,8 +1406,8 @@ os9k_read_ofile_symtab (pst)
bufp = symbuf;
type = bufp->n_type;
- os9k_process_one_symbol (type, bufp->n_desc, bufp->n_value,
- bufp->n_strx, section_offsets, objfile);
+ os9k_process_one_symbol ((int)type, (int)bufp->n_desc,
+ (CORE_ADDR)bufp->n_value, bufp->n_strx, section_offsets, objfile);
/* We skip checking for a new .o or -l file; that should never
happen in this routine. */