aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-05-06 21:16:11 +0000
committerFred Fish <fnf@specifix.com>1992-05-06 21:16:11 +0000
commit55b3ef9a579d2a5475728f8e53f71923af896f23 (patch)
tree57025fdc4acd8e8cf0dba63f2ef43217a65ff8da
parent32846f9c3e3714fcc88615c9f670850a5978354a (diff)
downloadfsf-binutils-gdb-55b3ef9a579d2a5475728f8e53f71923af896f23.zip
fsf-binutils-gdb-55b3ef9a579d2a5475728f8e53f71923af896f23.tar.gz
fsf-binutils-gdb-55b3ef9a579d2a5475728f8e53f71923af896f23.tar.bz2
* cplus-dem.c (do_args): Handle void args the same as others.
* objfiles.c (free_objfile): Only try to unmap files when reusable objfiles are supported. * valprint.c (type_print_varspec_suffix): Add parameter that specifies if C++ demangling included function arguments. Use it to suppress printing extra pair of ()'s. * valprint.c (type_print_1): Fix problem with printing demangled C++ function types where demangled type includes the function args.
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/cplus-dem.c6
-rw-r--r--gdb/objfiles.c12
3 files changed, 25 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1f2864c..ed7a397 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+Wed May 6 14:12:35 1992 Fred Fish (fnf@cygnus.com)
+
+ * cplus-dem.c (do_args): Handle void args the same as others.
+ * objfiles.c (free_objfile): Only try to unmap files when
+ reusable objfiles are supported.
+ * valprint.c (type_print_varspec_suffix): Add parameter that
+ specifies if C++ demangling included function arguments. Use
+ it to suppress printing extra pair of ()'s.
+ * valprint.c (type_print_1): Fix problem with printing demangled
+ C++ function types where demangled type includes the function
+ args.
+
Tue May 5 11:10:27 1992 Fred Fish (fnf@cygnus.com)
* Makefile.in (DEMANGLER): Define and default to cplus-dem.
diff --git a/gdb/cplus-dem.c b/gdb/cplus-dem.c
index ddd07e4..11d4e48 100644
--- a/gdb/cplus-dem.c
+++ b/gdb/cplus-dem.c
@@ -1114,7 +1114,7 @@ do_args (type, decl, work)
if (PRINT_ARG_TYPES)
string_append (decl, "(");
- while (**type != '_' && **type != '\0' && **type != 'e' && **type != 'v')
+ while (**type != '_' && **type != '\0' && **type != 'e')
{
if (**type == 'N')
{
@@ -1149,9 +1149,7 @@ do_args (type, decl, work)
}
}
- if (**type == 'v')
- *type += 1;
- else if (**type == 'e')
+ if (**type == 'e')
{
*type += 1;
if (PRINT_ARG_TYPES)
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 4443c5d..642026c 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -277,15 +277,24 @@ free_objfile (objfile)
case. Note that the mmalloc_detach or the mfree is the last thing
we can do with this objfile. */
+#if !defined(NO_MMALLOC) && defined(HAVE_MMAP)
+
if (objfile -> flags & OBJF_MAPPED)
{
/* Remember the fd so we can close it. We can't close it before
doing the detach, and after the detach the objfile is gone. */
mmfd = objfile -> mmfd;
mmalloc_detach (objfile -> md);
+ objfile = NULL;
(void) close (mmfd);
}
- else
+
+#endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
+
+ /* If we still have an objfile, then either we don't support reusable
+ objfiles or this one was not reusable. So free it normally. */
+
+ if (objfile != NULL)
{
if (objfile -> name != NULL)
{
@@ -296,6 +305,7 @@ free_objfile (objfile)
obstack_free (&objfile -> symbol_obstack, 0);
obstack_free (&objfile -> type_obstack, 0);
mfree (objfile -> md, objfile);
+ objfile = NULL;
}
}