/* Shared library support for IRIX.
Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2004,
- 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file was created using portions of irix5-nat.c originally
contributed to GDB by Ian Lance Taylor.
CORE_ADDR obj_addr = extract_mips_address (&buf.ol32.data,
sizeof (buf.ol32.data),
byte_order);
+
li.next = extract_mips_address (&buf.ol32.next,
sizeof (buf.ol32.next), byte_order);
{
int status = 1;
-
/* Note that breakpoint address and original contents are in our address
space, so we just need to write the original contents back. */
static int
enable_break (void)
{
- if (symfile_objfile != NULL)
+ if (symfile_objfile != NULL && has_stack_frames ())
{
- base_breakpoint
- = deprecated_insert_raw_breakpoint (target_gdbarch,
- entry_point_address ());
+ struct frame_info *frame = get_current_frame ();
+ struct address_space *aspace = get_frame_address_space (frame);
+ CORE_ADDR entry_point;
+
+ if (!entry_point_address_query (&entry_point))
+ return 0;
+
+ base_breakpoint = deprecated_insert_raw_breakpoint (target_gdbarch,
+ aspace, entry_point);
if (base_breakpoint != NULL)
return 1;
SYNOPSIS
- void solib_create_inferior_hook ()
+ void solib_create_inferior_hook (int from_tty)
DESCRIPTION
*/
static void
-irix_solib_create_inferior_hook (void)
+irix_solib_create_inferior_hook (int from_tty)
{
struct inferior *inf;
struct thread_info *tp;
+ inf = current_inferior ();
+
+ /* If we are attaching to the inferior, the shared libraries
+ have already been mapped, so nothing more to do. */
+ if (inf->attach_flag)
+ return;
+
+ /* Likewise when debugging from a core file, the shared libraries
+ have already been mapped, so nothing more to do. */
+ if (!target_can_run (¤t_target))
+ return;
+
if (!enable_break ())
{
warning (_("shared library handler failed to enable breakpoint"));
can go groveling around in the dynamic linker structures to find
out what we need to know about them. */
- inf = current_inferior ();
tp = inferior_thread ();
clear_proceed_status ();
irix_so_ops.current_sos = irix_current_sos;
irix_so_ops.open_symbol_file_object = irix_open_symbol_file_object;
irix_so_ops.in_dynsym_resolve_code = irix_in_dynsym_resolve_code;
+ irix_so_ops.bfd_open = solib_bfd_open;
}