aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2007-09-04 01:12:18 +0000
committerPedro Alves <palves@redhat.com>2007-09-04 01:12:18 +0000
commitde1b3c3d02b5d4c969a36d3bddcedbbce2551d19 (patch)
treeef18f9fa0d94968479f00711f723b8ecceb7b9ac /gdb/infcmd.c
parent892bacea17dda72924ca78e04dc2e3015230abdc (diff)
downloadgdb-de1b3c3d02b5d4c969a36d3bddcedbbce2551d19.zip
gdb-de1b3c3d02b5d4c969a36d3bddcedbbce2551d19.tar.gz
gdb-de1b3c3d02b5d4c969a36d3bddcedbbce2551d19.tar.bz2
* infcmd.c (post_create_inferior): Update comment.
(run_command_1): Always call post_create_inferior with 0 as from_tty. * i386-cygwin-tdep.h: New. * i386-cygwin-tdep.c: Include "i386-cygwin-tdep.h". (win32_xfer_shared_library): Make it extern. * win32-nat.c: Include gdb_obstack.h and xml-support.h and i386-cygwin-tdep.h. (win32_so_ops): Delete. (get_relocated_section_addrs): Delete. (solib_symbols_add): Delete. (register_loaded_dll): Delete. (win32_make_so): New. (handle_load_dll): Use win32_make_so. (win32_free_so): Free the passed in so. (win32_relocate_section_addresses): Delete. (win32_solib_create_inferior_hook): Delete. (handle_unload_dll): Don't add PE offset here. Free so with win32_free_so instead of free_so. (win32_special_symbol_handling): Delete. (get_win32_debug_event): Remove unneeded calls. Set state to TARGET_WAITKIND_LOADED on a dll unload. (do_initial_win32_stuff): Clear cygwin_load_start and cygwin_load_end. (map_code_section_args): Delete. (dll_code_sections_add): Delete. (core_section_load_dll_symbols): Delete. (win32_xfer_shared_libraries): New. (win32_current_sos): Delete. (win32_xfer_partial): New. (open_symbol_file_object): Delete. (in_dynsym_resolve_code): Delete. (init_win32_ops): Set win32_xfer_partial as to_xfer_partial member of win32_ops. Remove win32_so_ops settings. Don't set current_target_so_ops here. * Makefile.in (i386_cygwin_tdep_h): New variable. (i386-cygwin-tdep.o): Update dependencies. (win32-nat.o): Update dependencies.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index f183806..1690b5c 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -417,7 +417,9 @@ post_create_inferior (struct target_ops *target, int from_tty)
{
/* Sometimes the platform-specific hook loads initial shared
libraries, and sometimes it doesn't. Try to do so first, so
- that we can add them with the correct value for FROM_TTY. */
+ that we can add them with the correct value for FROM_TTY.
+ If we made all the inferior hook methods consistent,
+ this call could be removed. */
#ifdef SOLIB_ADD
SOLIB_ADD (NULL, from_tty, target, auto_solib_add);
#else
@@ -558,7 +560,9 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
target_create_inferior (exec_file, get_inferior_args (),
environ_vector (inferior_environ), from_tty);
- post_create_inferior (&current_target, from_tty);
+ /* Pass zero for FROM_TTY, because at this point the "run" command
+ has done its thing; now we are setting up the running program. */
+ post_create_inferior (&current_target, 0);
/* Start the target running. */
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
@@ -1193,11 +1197,11 @@ print_return_value (int struct_return, struct type *value_type)
internal_error (__FILE__, __LINE__, _("bad switch"));
}
+ stb = ui_out_stream_new (uiout);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
if (value)
{
/* Print it. */
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
record_latest_value (value));
@@ -1205,15 +1209,16 @@ print_return_value (int struct_return, struct type *value_type)
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
- do_cleanups (old_chain);
}
else
{
+ /* Just print the type. */
ui_out_text (uiout, "Value returned has type: ");
- ui_out_field_string (uiout, "return-type", TYPE_NAME (value_type));
- ui_out_text (uiout, ".");
- ui_out_text (uiout, " Cannot determine contents\n");
+ type_print (value_type, NULL, stb->stream, 0);
+ ui_out_field_stream (uiout, "return-type", stb);
+ ui_out_text (uiout, ". Cannot determine contents.\n");
}
+ do_cleanups (old_chain);
}
/* Stuff that needs to be done by the finish command after the target