diff options
author | Stu Grossman <grossman@cygnus> | 1992-07-18 00:29:40 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-07-18 00:29:40 +0000 |
commit | b5fee91eae82ca826913bce69d4cedc622f394dd (patch) | |
tree | 6cf950e3710a404b83178c676cc2081ec7d0eca4 | |
parent | 218e537ad78438f7f402afefd2d4d75678114c5d (diff) | |
download | gdb-b5fee91eae82ca826913bce69d4cedc622f394dd.zip gdb-b5fee91eae82ca826913bce69d4cedc622f394dd.tar.gz gdb-b5fee91eae82ca826913bce69d4cedc622f394dd.tar.bz2 |
* energize.c: Second cut at DynamicLoad message handling.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/energize.c | 36 |
2 files changed, 25 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f022039..4ae9e44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Fri Jul 17 16:52:04 1992 Stu Grossman (grossman at cygnus.com) + * energize.c: Second cut at DynamicLoad message handling. + * energize.c: Relativize pathnames in #include statements. * (kernel_dispatch): Better error messages for unknown protocol messages. diff --git a/gdb/energize.c b/gdb/energize.c index 33ee5a8..9310bf9 100644 --- a/gdb/energize.c +++ b/gdb/energize.c @@ -69,7 +69,8 @@ extern int pgrp_inferior; extern char *source_path; -char **pprompt; /* Pointer to pointer to prompt */ +/* The name of the executable file */ +static char *exec_file; /* Tell energize_command_line_input() where to get its text from */ static int doing_breakcommands_message = 0; @@ -1149,18 +1150,25 @@ kernel_dispatch(queue) } break; case DynamicLoadRType: - switch (req->dynamicLoad.request->action) - { - case CDynamicLoadUpdateSymtab: - printf_filtered("CDynamicLoadUpdateSymtab, filename=%s\n", - req->dynamicLoad.filenames.text); - break; - default: - printf_filtered("DynamicLoadRType: unknown action=%d, filename=%s\n", - req->dynamicLoad.request->action, - req->dynamicLoad.filenames.text); - break; - } + { + char *filename; + + filename = req->dynamicLoad.filenames.byteLen ? + req->dynamicLoad.filenames.text : exec_file; + + switch (req->dynamicLoad.request->action) + { + case CDynamicLoadUpdateSymtab: + execute_command_1(1, queue, "exec-file %s", filename); + execute_command_1(1, queue, "symbol-file %s", filename); + break; + default: + printf_filtered("DynamicLoadRType: unknown action=%d, filename=%s\n", + req->dynamicLoad.request->action, + req->dynamicLoad.filenames.text); + break; + } + } break; default: fprintf(stderr, "Unknown Debugger request type = %d\n", @@ -1309,6 +1317,8 @@ energize_initialize(energize_id, execarg) if (!execarg) execarg = ""; + exec_file = strdup(execarg); /* Save for later */ + printf("\ngdb-debugger pid=%d\n", getpid()); /* XXX - debugging only */ /* First establish the connection with the kernel. */ |