From: Patrick Monnerat Date: Fri, 4 May 2018 14:50:54 +0000 (+0200) Subject: Upgrade submodule, sync patch and code. X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b0333d5576271f10449cbba8af766f575cd0ef30;p=insight.git Upgrade submodule, sync patch and code. * gdbtk/generic/gdbtk-cmds.c (gdb_clear_file): use exec_close () instead of exec_file_clear (). (gdb_stop): do not check to_stop in non null, since this is now handled by virtual methods. (gdb_entry_point): use *target_stack instead of current_target. (gdb_update_mem): likewise. * gdbtk/generic/gdbtk.c (gdb_interactive): use *target_stack instead of current_target. (target_is_native): use method shortname () instead of member to_shortname. --- diff --git a/binutils-gdb b/binutils-gdb index 425050f..11859c3 160000 --- a/binutils-gdb +++ b/binutils-gdb @@ -1 +1 @@ -Subproject commit 425050ff8dd355e315fa612f25c9588f9cd55a1a +Subproject commit 11859c310cd6b6fd892337a5ee1d36921e6d08d8 diff --git a/gdbtk/generic/gdbtk-cmds.c b/gdbtk/generic/gdbtk-cmds.c index d7af278..8e4a651 100644 --- a/gdbtk/generic/gdbtk-cmds.c +++ b/gdbtk/generic/gdbtk-cmds.c @@ -1,5 +1,5 @@ /* Tcl/Tk command definitions for Insight. - Copyright (C) 1994-2017 Free Software Foundation, Inc. + Copyright (C) 1994-2018 Free Software Foundation, Inc. Written by Stu Grossman of Cygnus Support. Substantially augmented by Martin Hunt, Keith Seitz & Jim Ingham of @@ -476,7 +476,7 @@ gdb_clear_file (ClientData clientData, Tcl_Interp *interp, } gdbtk_delete_all_breakpoints (); - exec_file_clear (0); + exec_close (); symbol_file_clear (0); return TCL_OK; @@ -576,12 +576,7 @@ gdb_stop (ClientData clientData, Tcl_Interp *interp, gdbtk_force_detach = 1; } else - { - if (NULL != (void (*) (void)) current_target.to_stop) - target_stop (gdbtk_get_ptid ()); - else - set_quit_flag (); /* hope something sees this */ - } + target_stop (gdbtk_get_ptid ()); return TCL_OK; } @@ -2309,7 +2304,7 @@ gdb_entry_point (ClientData clientData, Tcl_Interp *interp, /* If we have not yet loaded an exec file, then we have no entry point, so return an empty string.*/ - if ((int) current_target.to_stratum > (int) dummy_stratum) + if ((int) target_stack->to_stratum > (int) dummy_stratum) { addrstr = (char *)core_addr_to_string (entry_point_address ()); Tcl_SetStringObj (result_ptr->obj_ptr, addrstr, -1); @@ -2519,8 +2514,8 @@ gdb_update_mem (ClientData clientData, Tcl_Interp *interp, mptr = cptr = mbuf; /* Dispatch memory reads to the topmost target, not the flattened - current_target. */ - rnum = target_read (current_target.beneath, TARGET_OBJECT_MEMORY, NULL, + current target. */ + rnum = target_read (target_stack->beneath, TARGET_OBJECT_MEMORY, NULL, mbuf, addr, nbytes); if (rnum <= 0) { diff --git a/gdbtk/generic/gdbtk.c b/gdbtk/generic/gdbtk.c index 306d25f..bc9f269 100644 --- a/gdbtk/generic/gdbtk.c +++ b/gdbtk/generic/gdbtk.c @@ -637,7 +637,7 @@ gdbtk_start_timer (void) #endif } - if (target_should_use_timer (¤t_target)) + if (target_should_use_timer (target_stack)) { if (!gdbtk_timer_going) { @@ -678,7 +678,7 @@ target_should_use_timer (struct target_ops *t) int target_is_native (struct target_ops *t) { - const char *name = t->to_shortname; + const char *name = t->shortname (); if (strcmp (name, "exec") == 0 || strcmp (name, "hpux-threads") == 0 || strcmp (name, "child") == 0 || strcmp (name, "procfs") == 0 diff --git a/patches/binutils-gdb/001-itcltk4.patch b/patches/binutils-gdb/001-itcltk4.patch index 95140f1..1180897 100644 --- a/patches/binutils-gdb/001-itcltk4.patch +++ b/patches/binutils-gdb/001-itcltk4.patch @@ -81,7 +81,7 @@ diff -Naurp a/configure.ac b/configure.ac ;; i[[3456789]]86-w64-mingw*) ;; -@@ -1114,13 +1099,13 @@ case "${target}" in +@@ -1118,13 +1103,13 @@ case "${target}" in ;; powerpc*-*-winnt* | powerpc*-*-pe*) target_configdirs="$target_configdirs target-winsup" @@ -97,7 +97,7 @@ diff -Naurp a/configure.ac b/configure.ac ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs gdb" -@@ -2702,7 +2687,7 @@ if echo " ${target_configdirs} " | grep +@@ -2706,7 +2691,7 @@ if echo " ${target_configdirs} " | grep esac fi @@ -106,7 +106,7 @@ diff -Naurp a/configure.ac b/configure.ac # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh! # In fact I believe gdb is the *only* package directly dependent on tk, -@@ -2710,7 +2695,7 @@ fi +@@ -2714,7 +2699,7 @@ fi # leave out the maybe dependencies when enable_gdbtk is false. I'm not # 100% sure that that's safe though.