aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-09-10 08:50:10 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-09-10 08:50:10 +0000
commit26a859ec838aa00054f5504cbe3dc2e09771ed81 (patch)
treeb8f9c559018ce1afc32d332cb4d0aa582d0682de
parentb35be5109247d25244c3ee581c83fd01b86e0b93 (diff)
downloadgdb-26a859ec838aa00054f5504cbe3dc2e09771ed81.zip
gdb-26a859ec838aa00054f5504cbe3dc2e09771ed81.tar.gz
gdb-26a859ec838aa00054f5504cbe3dc2e09771ed81.tar.bz2
* corelow.c (add_solib_stub): Copy to_sections changes from
core_ops to current_target after adding the shared libraries. * partial-stab.h (N_EXCL), dbxread.c (add_old_header_file, find_corresponding_bincl_psymtab): Change `repeated header not seen' error to a complaint, simplify complaint. * procfs.c (signalname, errnoname): Make `name' const. * symfile.c (reread_symbols): Use filename from old BFD to reopen the objfile. * values.c (record_latest_value): Don't record value in the history chain until we are sure there won't be an error.
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/corelow.c9
-rw-r--r--gdb/dbxread.c24
-rw-r--r--gdb/partial-stab.h3
-rw-r--r--gdb/procfs.c4
-rw-r--r--gdb/values.c24
6 files changed, 41 insertions, 36 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e0ea7a9..775a082 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+Sat Sep 10 01:43:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * corelow.c (add_solib_stub): Copy to_sections changes from
+ core_ops to current_target after adding the shared libraries.
+ * partial-stab.h (N_EXCL), dbxread.c (add_old_header_file,
+ find_corresponding_bincl_psymtab): Change `repeated header not seen'
+ error to a complaint, simplify complaint.
+ * procfs.c (signalname, errnoname): Make `name' const.
+ * symfile.c (reread_symbols): Use filename from old BFD to
+ reopen the objfile.
+ * values.c (record_latest_value): Don't record value in the
+ history chain until we are sure there won't be an error.
+
Fri Sep 9 15:52:09 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
* nlm/Makefile.in: remove MMALLOC, READLINE, TERMCAP, and other
diff --git a/gdb/corelow.c b/gdb/corelow.c
index ac18215..a84c996 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -79,8 +79,13 @@ static int
solib_add_stub (from_ttyp)
char *from_ttyp;
{
- SOLIB_ADD (NULL, *(int *)from_ttyp, &core_ops);
- return 0;
+ SOLIB_ADD (NULL, *(int *)from_ttyp, &core_ops);
+
+ /* SOLIB_ADD usually modifies core_ops.to_sections, which has to
+ be reflected in current_target. */
+ current_target.to_sections = core_ops.to_sections;
+ current_target.to_sections_end = core_ops.to_sections_end;
+ return 0;
}
#endif /* SOLIB_ADD */
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 5445c8a..4ee97f3 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -52,7 +52,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "command.h"
#include "target.h"
#include "gdbcore.h" /* for bfd stuff */
-#include "libbfd.h" /* FIXME Secret internal BFD stuff (bfd_read) */
#include "libaout.h" /* FIXME Secret internal BFD stuff for a.out */
#include "symfile.h"
#include "objfiles.h"
@@ -177,10 +176,7 @@ struct complaint lbrac_mismatch_complaint =
{"N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d", 0, 0};
struct complaint repeated_header_complaint =
- {"\"repeated\" header file not previously seen, at symtab pos %d", 0, 0};
-
-struct complaint repeated_header_name_complaint =
- {"\"repeated\" header file not previously seen, named %s", 0, 0};
+ {"\"repeated\" header file %s not previously seen, at symtab pos %d", 0, 0};
/* During initial symbol readin, we need to have a structure to keep
track of which psymtabs have which bincls in them. This structure
@@ -346,8 +342,7 @@ add_old_header_file (name, instance)
add_this_object_header_file (i);
return;
}
- complain (&repeated_header_complaint, symnum);
- complain (&repeated_header_name_complaint, name);
+ complain (&repeated_header_complaint, name, symnum);
}
/* Add to this file a "new" header file: definitions for its types follow.
@@ -568,22 +563,15 @@ dbx_symfile_read (objfile, section_offsets, mainline)
bfd_section_vma (sym_bfd, DBX_TEXT_SECT (objfile)),
bfd_section_size (sym_bfd, DBX_TEXT_SECT (objfile)));
- /* Add the dynamic symbols if we are reading the main symbol table. */
+ /* Add the dynamic symbols. */
- if (mainline)
- read_dbx_dynamic_symtab (section_offsets, objfile);
+ read_dbx_dynamic_symtab (section_offsets, objfile);
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
install_minimal_symbols (objfile);
- if (!have_partial_symbols ()) {
- wrap_here ("");
- printf_filtered ("(no debugging symbols found)...");
- wrap_here ("");
- }
-
do_cleanups (back_to);
}
@@ -876,6 +864,7 @@ find_corresponding_bincl_psymtab (name, instance)
&& STREQ (name, bincl->name))
return bincl->pst;
+ complain (&repeated_header_complaint, name, symnum);
return (struct partial_symtab *) 0;
}
@@ -1002,7 +991,8 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
counter++, relptr++)
{
arelent *rel = *relptr;
- CORE_ADDR address = rel->address;
+ CORE_ADDR address =
+ rel->address + ANOFFSET (section_offsets, SECT_OFF_DATA);
switch (bfd_get_arch (abfd))
{
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index d66c505..1d2d3a2 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -634,9 +634,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
}
}
- else
- error ("Invalid symbol data: \"repeated\" header file not previously seen, at symtab pos %d.",
- symnum);
}
#endif /* DBXREAD_ONLY */
continue;
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 5d3ed27..e6e3f9c 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3080,7 +3080,7 @@ static char *
signalname (signo)
int signo;
{
- char *name;
+ const char *name;
static char locbuf[32];
name = strsigno (signo);
@@ -3099,7 +3099,7 @@ static char *
errnoname (errnum)
int errnum;
{
- char *name;
+ const char *name;
static char locbuf[32];
name = strerrno (errnum);
diff --git a/gdb/values.c b/gdb/values.c
index 1c833af..1eaef33 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -259,6 +259,18 @@ record_latest_value (val)
if (i) return -1; /* Indicate value not saved in history */
}
+ /* We don't want this value to have anything to do with the inferior anymore.
+ In particular, "set $1 = 50" should not affect the variable from which
+ the value was taken, and fast watchpoints should be able to assume that
+ a value on the value history never changes. */
+ if (VALUE_LAZY (val))
+ value_fetch_lazy (val);
+ /* We preserve VALUE_LVAL so that the user can find out where it was fetched
+ from. This is a bit dubious, because then *&$1 does not just return $1
+ but the current contents of that location. c'est la vie... */
+ val->modifiable = 0;
+ release_value (val);
+
/* Here we treat value_history_count as origin-zero
and applying to the value being stored now. */
@@ -275,18 +287,6 @@ record_latest_value (val)
value_history_chain->values[i] = val;
- /* We don't want this value to have anything to do with the inferior anymore.
- In particular, "set $1 = 50" should not affect the variable from which
- the value was taken, and fast watchpoints should be able to assume that
- a value on the value history never changes. */
- if (VALUE_LAZY (val))
- value_fetch_lazy (val);
- /* We preserve VALUE_LVAL so that the user can find out where it was fetched
- from. This is a bit dubious, because then *&$1 does not just return $1
- but the current contents of that location. c'est la vie... */
- val->modifiable = 0;
- release_value (val);
-
/* Now we regard value_history_count as origin-one
and applying to the value just stored. */