errors in "long long" handling for 'finish' and 'return' commands.
* win32-nat.c (safe_symbol_file_add_stub): Avoid adding a shared library if it
has already been loaded.
(safe_symbol_file_add_cleanup): Don't mess with stderr or we won't see any
error messages.
(safe_symbol_file_add): Ditto.
(solib_symbols_add): Make static. Accept 'from_tty' parameter. Pass it to
safe_symbol_file_add.
(core_dll_symbols_add): Accomodate extra solib_symbols_add parameter.
(child_solib_add): Ditto.
* win32-nat.c (handle_exception): Don't print "first chance" exceptions.
(get_child_debug_event): Continue from exceptions if !handle_exception.
+2001-10-12 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * config/i386/tm-cygwin.h: include tm-i386.h instead of tm-i386v.h.
+ This fixes errors in "long long" handling for 'finish' and 'return'
+ commands.
+
+2001-10-12 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (safe_symbol_file_add_stub): Avoid adding a shared
+ library if it has already been loaded.
+ (safe_symbol_file_add_cleanup): Don't mess with stderr or we won't see
+ any error messages.
+ (safe_symbol_file_add): Ditto.
+ (solib_symbols_add): Make static. Accept 'from_tty' parameter. Pass
+ it to safe_symbol_file_add.
+ (core_dll_symbols_add): Accomodate extra solib_symbols_add parameter.
+ (child_solib_add): Ditto.
+
+ * win32-nat.c (handle_exception): Don't print "first chance"
+ exceptions.
+ (get_child_debug_event): Continue from exceptions if !handle_exception.
+
2001-10-11 Tom Tromey <tromey@redhat.com>
* symtab.c (lookup_symtab): Removed.
#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */
#define HAVE_I387_REGS
-#include "i386/tm-i386v.h"
+#include "i386/tm-i386.h"
#if 0
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
struct objfile *ret;
};
+/* Maintain a linked list of "so" information. */
+struct so_stuff
+{
+ struct so_stuff *next, **last;
+ DWORD load_addr;
+ char name[0];
+}
+solib_start, *solib_end;
+
/* Call symbol_file_add with stderr redirected. We don't care if there
are errors. */
static int
safe_symbol_file_add_stub (void *argv)
{
#define p ((struct safe_symbol_file_add_args *)argv)
+ struct so_stuff *so = solib_start.next;
+
+ while ((so = so->next))
+ if (strcasecmp (so->name, p->name) == 0)
+ return 0;
p->ret = symbol_file_add (p->name, p->from_tty, p->addrs, p->mainline, p->flags);
return !!p->ret;
#undef p
#define sp ((struct safe_symbol_file_add_args *)p)
gdb_flush (gdb_stderr);
gdb_flush (gdb_stdout);
- ui_file_delete (gdb_stderr);
+ /* ui_file_delete (gdb_stderr); */
ui_file_delete (gdb_stdout);
- gdb_stderr = sp->err;
+ /* gdb_stderr = sp->err; */
gdb_stdout = sp->out;
#undef sp
}
p.out = gdb_stdout;
gdb_flush (gdb_stderr);
gdb_flush (gdb_stdout);
- gdb_stderr = ui_file_new ();
+ /* gdb_stderr = ui_file_new (); */
gdb_stdout = ui_file_new ();
p.name = name;
p.from_tty = from_tty;
return p.ret;
}
-/* Maintain a linked list of "so" information. */
-struct so_stuff
-{
- struct so_stuff *next, **last;
- DWORD load_addr;
- char name[0];
-}
-solib_start, *solib_end;
-
/* Remember the maximum DLL length for printing in info dll command. */
int max_dll_name_len;
}
/* Add DLL symbol information. */
-void
-solib_symbols_add (char *name, CORE_ADDR load_addr)
+static void
+solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
{
struct section_addr_info section_addrs;
memset (§ion_addrs, 0, sizeof (section_addrs));
section_addrs.other[0].name = ".text";
section_addrs.other[0].addr = load_addr;
- safe_symbol_file_add (name, 0, §ion_addrs, 0, OBJF_SHARED);
+ safe_symbol_file_add (name, from_tty, 0, 0, OBJF_SHARED);
return;
}
last_sig = SIGILL;
break;
default:
+ if (current_event.u.Exception.dwFirstChance)
+ return 0;
printf_unfiltered ("gdb: unknown target exception 0x%08lx at 0x%08lx\n",
current_event.u.Exception.ExceptionRecord.ExceptionCode,
(DWORD) current_event.u.Exception.ExceptionRecord.ExceptionAddress);
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"EXCEPTION_DEBUG_EVENT"));
- handle_exception (ourstatus);
- retval = current_event.dwThreadId;
+ if (handle_exception (ourstatus))
+ retval = current_event.dwThreadId;
break;
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */
}
register_loaded_dll (dll_name, base_addr + 0x1000);
- solib_symbols_add (dll_name, (CORE_ADDR) base_addr + 0x1000);
+ solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
out:
return 1;
}
void
-child_solib_add (char *filename ATTRIBUTE_UNUSED, int from_tty ATTRIBUTE_UNUSED, struct target_ops *target)
+child_solib_add (char *filename ATTRIBUTE_UNUSED, int from_tty, struct target_ops *target)
{
if (core_bfd)
{
else
{
if (solib_end && solib_end->name)
- solib_symbols_add (solib_end->name, solib_end->load_addr);
+ solib_symbols_add (solib_end->name, from_tty, solib_end->load_addr);
}
}
struct objfile *ret;
};
+/* Maintain a linked list of "so" information. */
+struct so_stuff
+{
+ struct so_stuff *next, **last;
+ DWORD load_addr;
+ char name[0];
+}
+solib_start, *solib_end;
+
/* Call symbol_file_add with stderr redirected. We don't care if there
are errors. */
static int
safe_symbol_file_add_stub (void *argv)
{
#define p ((struct safe_symbol_file_add_args *)argv)
+ struct so_stuff *so = solib_start.next;
+
+ while ((so = so->next))
+ if (strcasecmp (so->name, p->name) == 0)
+ return 0;
p->ret = symbol_file_add (p->name, p->from_tty, p->addrs, p->mainline, p->flags);
return !!p->ret;
#undef p
#define sp ((struct safe_symbol_file_add_args *)p)
gdb_flush (gdb_stderr);
gdb_flush (gdb_stdout);
- ui_file_delete (gdb_stderr);
+ /* ui_file_delete (gdb_stderr); */
ui_file_delete (gdb_stdout);
- gdb_stderr = sp->err;
+ /* gdb_stderr = sp->err; */
gdb_stdout = sp->out;
#undef sp
}
p.out = gdb_stdout;
gdb_flush (gdb_stderr);
gdb_flush (gdb_stdout);
- gdb_stderr = ui_file_new ();
+ /* gdb_stderr = ui_file_new (); */
gdb_stdout = ui_file_new ();
p.name = name;
p.from_tty = from_tty;
return p.ret;
}
-/* Maintain a linked list of "so" information. */
-struct so_stuff
-{
- struct so_stuff *next, **last;
- DWORD load_addr;
- char name[0];
-}
-solib_start, *solib_end;
-
/* Remember the maximum DLL length for printing in info dll command. */
int max_dll_name_len;
}
/* Add DLL symbol information. */
-void
-solib_symbols_add (char *name, CORE_ADDR load_addr)
+static void
+solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
{
struct section_addr_info section_addrs;
memset (§ion_addrs, 0, sizeof (section_addrs));
section_addrs.other[0].name = ".text";
section_addrs.other[0].addr = load_addr;
- safe_symbol_file_add (name, 0, §ion_addrs, 0, OBJF_SHARED);
+ safe_symbol_file_add (name, from_tty, 0, 0, OBJF_SHARED);
return;
}
last_sig = SIGILL;
break;
default:
+ if (current_event.u.Exception.dwFirstChance)
+ return 0;
printf_unfiltered ("gdb: unknown target exception 0x%08lx at 0x%08lx\n",
current_event.u.Exception.ExceptionRecord.ExceptionCode,
(DWORD) current_event.u.Exception.ExceptionRecord.ExceptionAddress);
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"EXCEPTION_DEBUG_EVENT"));
- handle_exception (ourstatus);
- retval = current_event.dwThreadId;
+ if (handle_exception (ourstatus))
+ retval = current_event.dwThreadId;
break;
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */
}
register_loaded_dll (dll_name, base_addr + 0x1000);
- solib_symbols_add (dll_name, (CORE_ADDR) base_addr + 0x1000);
+ solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
out:
return 1;
}
void
-child_solib_add (char *filename ATTRIBUTE_UNUSED, int from_tty ATTRIBUTE_UNUSED, struct target_ops *target)
+child_solib_add (char *filename ATTRIBUTE_UNUSED, int from_tty, struct target_ops *target)
{
if (core_bfd)
{
else
{
if (solib_end && solib_end->name)
- solib_symbols_add (solib_end->name, solib_end->load_addr);
+ solib_symbols_add (solib_end->name, from_tty, solib_end->load_addr);
}
}