+Sun May 17 16:51:20 1992 Fred Fish (fnf@cygnus.com)
+
+ * inflow.c (new_tty): Temporarily ignore SIGTTOU when
+ disconnecting from controlling terminal, to avoid gdb hanging
+ on SVR4. Fixes bug reported by Oliver Okrongli.
+ * procfs.c (PROC_NAME_FMT): Change format to match default used
+ by system, as suggested by Oliver Okrongli.
+ * tm-68k.h (FRAME_FIND_SAVED_REGS): Apply missing parentheses
+ bug fix from Brent Townshend (bst%tt@cam.ORG).
+ * c-exp.y (nonempty_typelist): Fix memory overrun bug reported
+ by turlais@rechser.total.fr.
+ * dwarfread.c (decode_subscr_data): Fix bug in calculation of
+ length of non-zero lowerbound arrays. Bug fix from Peggy Fieland.
+ * objfiles.h (unlink_objfile): Add prototype.
+ * objfiles.c (unlink_objfile): Add function.
+ * objfiles.c (free_objfile): Call unlink_objfile.
+ * objfiles.c (allocate_objfile): Call unlink_objfile on newly
+ remapped objfiles. Bug reported by hahn@sunshine.labs.tek.com.
+ Also, discard old possibly bogus sf struct.
+ * symfile.c (symbol_file_add): Call init_entry_point_info() and
+ find_sym_fns() for remapped symbol files, in case of any changes
+ since the last mapping.
+
+Wed May 13 18:28:20 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * findvar.c (read_relative_register_raw_bytes): use the raw size
+ of a register to bcopy, rather than the host's sizeof(CORE_ADDR).
+
Tue May 12 17:44:39 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Changes to support GDB running on DOS using GO32 and H8 support
nonempty_typelist
: type
- { $$ = (struct type **)xmalloc (sizeof (struct type *) * 2);
- $$[0] = (struct type *)0;
+ { $$ = (struct type **) xmalloc (sizeof (struct type *) * 2);
+ $<ivec>$[0] = 1; /* Number of types in vector */
$$[1] = $1;
}
| nonempty_typelist ',' type
- { int len = sizeof (struct type *) * ++($<ivec>1[0]);
- $$ = (struct type **)xrealloc ((char *) $1, len);
+ { int len = sizeof (struct type *) * (++($<ivec>1[0]) + 1);
+ $$ = (struct type **) xrealloc ((char *) $1, len);
$$[$<ivec>$[0]] = $3;
}
;
TYPE_OBJFILE (typep) = current_objfile;
TYPE_CODE (typep) = TYPE_CODE_ARRAY;
TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype);
- TYPE_LENGTH (typep) *= lowbound + highbound + 1;
+ TYPE_LENGTH (typep) *= (highbound - lowbound) + 1;
TYPE_TARGET_TYPE (typep) = nexttype;
}
}
obstack_freefun (&objfile -> symbol_obstack, mfree);
obstack_chunkfun (&objfile -> type_obstack, xmmalloc);
obstack_freefun (&objfile -> type_obstack, mfree);
+ /* If already in objfile list, unlink it. */
+ unlink_objfile (objfile);
+ /* Forget things specific to a particular gdb, may have changed. */
+ objfile -> sf = NULL;
}
else
{
return (objfile);
}
+/* Unlink OBJFILE from the list of known objfiles, if it is found in the
+ list.
+
+ It is not a bug, or error, to call this function if OBJFILE is not known
+ to be in the current list. This is done in the case of mapped objfiles,
+ for example, just to ensure that the mapped objfile doesn't appear twice
+ in the list. Since the list is threaded, linking in a mapped objfile
+ twice would create a circular list.
+
+ If OBJFILE turns out to be in the list, we zap it's NEXT pointer after
+ unlinking it, just to ensure that we have completely severed any linkages
+ between the OBJFILE and the list. */
+
+void
+unlink_objfile (objfile)
+ struct objfile *objfile;
+{
+ struct objfile** objpp;
+
+ for (objpp = &object_files; *objpp != NULL; objpp = &((*objpp) -> next))
+ {
+ if (*objpp == objfile)
+ {
+ *objpp = (*objpp) -> next;
+ objfile -> next = NULL;
+ break;
+ }
+ }
+}
+
/* Destroy an objfile and all the symtabs and psymtabs under it. Note
that as much as possible is allocated on the symbol_obstack and
/* Remove it from the chain of all objfiles. */
- if (object_files == objfile)
- {
- object_files = objfile -> next;
- }
- else
- {
- for (ofp = object_files; ofp; ofp = ofp -> next)
- {
- if (ofp -> next == objfile)
- {
- ofp -> next = objfile -> next;
- break;
- }
- }
- }
- objfile -> next = NULL;
+ unlink_objfile (objfile);
#if 0 /* FIXME!! */
allocate_objfile PARAMS ((bfd *, int));
extern void
+unlink_objfile PARAMS ((struct objfile *));
+
+extern void
free_objfile PARAMS ((struct objfile *));
extern void
#define MAX_SYSCALLS 256 /* Maximum number of syscalls for table */
#ifndef PROC_NAME_FMT
-#define PROC_NAME_FMT "/proc/%d"
+#define PROC_NAME_FMT "/proc/%05d"
#endif
#if 1 /* FIXME: Gross and ugly hack to resolve coredep.c global */
for (regnum = 15; regnum >= 0; regnum--, regmask >>= 1) \
if (regmask & 1) \
(frame_saved_regs).regs[regnum] = (next_addr -= 4); } \
- else if (0x2f00 == 0xfff0 & read_memory_integer (pc, 2)) \
+ else if (0x2f00 == (0xfff0 & read_memory_integer (pc, 2))) \
{ regnum = 0xf & read_memory_integer (pc, 2); pc += 2; \
(frame_saved_regs).regs[regnum] = (next_addr -= 4); } \
/* clrw -(sp); movw ccr,-(sp) may follow. */ \