symfile_flags.
* solib.c (solib_read_symbols): Use inferior's symfile_flags.
* linux-nat.c (linux_child_follow_fork): Set symfile_flags on
inferior.
* infrun.c (handle_vfork_child_exec_or_exit): Set symfile_flags on
inferior.
(follow_exec): Use inferior's symfile_flags.
* inferior.h (struct inferior) <symfile_flags>: New field.
+2012-02-16 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (symbol_file_add_main_1): Use inferior's
+ symfile_flags.
+ * solib.c (solib_read_symbols): Use inferior's symfile_flags.
+ * linux-nat.c (linux_child_follow_fork): Set symfile_flags on
+ inferior.
+ * infrun.c (handle_vfork_child_exec_or_exit): Set symfile_flags on
+ inferior.
+ (follow_exec): Use inferior's symfile_flags.
+ * inferior.h (struct inferior) <symfile_flags>: New field.
+
2012-02-16 Mike Frysinger <vapier@gentoo.org>
PR gdb/9734:
if any catching is necessary. */
int total_syscalls_count;
+ /* Default flags to pass to the symbol reading functions. These are
+ used whenever a new objfile is created. The valid values come
+ from enum symfile_add_flags. */
+ int symfile_flags;
+
/* Per inferior data-pointers required by other GDB modules. */
void **data;
unsigned num_data;
pspace = add_program_space (maybe_new_address_space ());
set_current_program_space (pspace);
inf->removable = 1;
+ inf->symfile_flags = SYMFILE_NO_READ;
clone_program_space (pspace, inf->vfork_parent->pspace);
inf->pspace = pspace;
inf->aspace = pspace->aspace;
solib_create_inferior_hook below. breakpoint_re_set would fail to insert
the breakpoints with the zero displacement. */
- symbol_file_add (execd_pathname, SYMFILE_MAINLINE | SYMFILE_DEFER_BP_RESET,
+ symbol_file_add (execd_pathname,
+ (inf->symfile_flags
+ | SYMFILE_MAINLINE | SYMFILE_DEFER_BP_RESET),
NULL, 0);
- set_initial_language ();
+ if ((inf->symfile_flags & SYMFILE_NO_READ) == 0)
+ set_initial_language ();
#ifdef SOLIB_CREATE_INFERIOR_HOOK
SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
#include "solib.h"
#include "linux-osdata.h"
#include "linux-tdep.h"
+#include "symfile.h"
#ifndef SPUFS_MAGIC
#define SPUFS_MAGIC 0x23c9b64e
child_lp = add_lwp (inferior_ptid);
child_lp->stopped = 1;
child_lp->last_resume_kind = resume_stop;
+ child_inf->symfile_flags = SYMFILE_NO_READ;
/* If this is a vfork child, then the address-space is
shared with the parent. */
child_inf->aspace = new_address_space ();
child_inf->pspace = add_program_space (child_inf->aspace);
child_inf->removable = 1;
+ child_inf->symfile_flags = SYMFILE_NO_READ;
set_current_program_space (child_inf->pspace);
clone_program_space (child_inf->pspace, parent_pspace);
{
volatile struct gdb_exception e;
+ flags |= current_inferior ()->symfile_flags;
+
TRY_CATCH (e, RETURN_MASK_ERROR)
{
struct section_addr_info *sap;
static void
symbol_file_add_main_1 (char *args, int from_tty, int flags)
{
- const int add_flags = SYMFILE_MAINLINE | (from_tty ? SYMFILE_VERBOSE : 0);
+ const int add_flags = (current_inferior ()->symfile_flags
+ | SYMFILE_MAINLINE | (from_tty ? SYMFILE_VERBOSE : 0));
+
symbol_file_add (args, add_flags, NULL, flags);
/* Getting new symbols may change our opinion about
what is frameless. */
reinit_frame_cache ();
- set_initial_language ();
+ if ((flags & SYMFILE_NO_READ) == 0)
+ set_initial_language ();
}
void