Allow to add irt symbols with nacl-irt command.
BUG= none
TEST= use nacl-irt irt.nexe command and set breakpoint to __libc_init_array.
Review URL: https://chromiumcodereview.appspot.com/10828011
diff --git a/gdb/nacl-manifest.c b/gdb/nacl-manifest.c
index 927a269..b5c6d5b 100644
--- a/gdb/nacl-manifest.c
+++ b/gdb/nacl-manifest.c
@@ -26,6 +26,7 @@
#include "readline/readline.h"
#include "solib.h"
#include "symfile.h"
+#include "objfiles.h"
#include <ctype.h>
#include <stdio.h>
@@ -56,8 +57,6 @@
/* runnable-ld.so or statically linked 64-bit program name. */
static char *nacl_program_filename_64 = NULL;
-static char *nacl_irt_filename = NULL;
-
const char *
nacl_manifest_find (char *original_name)
{
@@ -342,10 +341,11 @@
{
if (args)
{
- xfree (nacl_irt_filename);
+ char *nacl_irt_filename;
nacl_irt_filename = tilde_expand (args);
-
- solib_add (NULL, from_tty, NULL, 1);
+ symbol_file_add (nacl_irt_filename, from_tty ? SYMFILE_VERBOSE : 0,
+ NULL, OBJF_USERLOADED);
+ xfree (nacl_irt_filename);
}
}
diff --git a/gdb/nacl-manifest.h b/gdb/nacl-manifest.h
index 81a726a..1035314 100644
--- a/gdb/nacl-manifest.h
+++ b/gdb/nacl-manifest.h
@@ -23,9 +23,6 @@
/* Real filename for Native Client program. */
const char *nacl_manifest_program (void);
-/* Real filename for Native Client IRT. */
-const char *nacl_manifest_irt (void);
-
/* Real filename for Native Client original_name. */
const char *nacl_manifest_find (char *original_name);