gdb/gdb-bz595475-tui-layout.patch
2010-07-11 18:06:33 +00:00

80 lines
2.8 KiB
Diff

https://bugzilla.redhat.com/show_bug.cgi?id=586566
http://sourceware.org/ml/gdb-patches/2010-03/msg00746.html
http://sourceware.org/ml/gdb-patches/2010-05/msg00551.html
http://sourceware.org/ml/gdb-cvs/2010-03/msg00194.html
### src/gdb/ChangeLog 2010/03/19 22:00:16 1.11508
### src/gdb/ChangeLog 2010/03/20 05:17:10 1.11509
## -1,3 +1,9 @@
+2010-03-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * tui/tui-disasm.c (tui_get_begin_asm_address): Default to
+ get_current_arch.
+ * tui/tui-layout.c (extract_display_start_addr): Likewise.
+
2010-03-19 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (gen_fetch): Handle bool.
--- src/gdb/tui/tui-disasm.c 2010/01/01 07:32:07 1.33
+++ src/gdb/tui/tui-disasm.c 2010/03/20 05:17:10 1.34
@@ -21,6 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "arch-utils.h"
#include "symtab.h"
#include "breakpoint.h"
#include "frame.h"
@@ -330,7 +331,7 @@
{
struct tui_gen_win_info *locator;
struct tui_locator_element *element;
- struct gdbarch *gdbarch = NULL;
+ struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR addr;
locator = tui_locator_win_info_ptr ();
--- src/gdb/tui/tui-layout.c 2010/01/01 07:32:07 1.36
+++ src/gdb/tui/tui-layout.c 2010/03/20 05:17:10 1.37
@@ -21,6 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "arch-utils.h"
#include "command.h"
#include "symtab.h"
#include "frame.h"
@@ -522,7 +523,7 @@
extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
{
enum tui_layout_type cur_layout = tui_current_layout ();
- struct gdbarch *gdbarch = NULL;
+ struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR addr;
CORE_ADDR pc;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
--- /dev/null 2010-05-24 04:43:32.632794021 +0200
+++ gdb-7.1/gdb/testsuite/gdb.base/tui-layout.exp 2010-05-24 20:13:30.000000000 +0200
@@ -0,0 +1,21 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile tui-layout
+if { [prepare_for_testing ${testfile}.exp ${testfile} start.c] } {
+ return -1
+}
+
+gdb_test "layout asm"