From 0701b271317da6be2e9913db907285c2ebc39711 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 15 Jan 2009 15:38:57 +0000 Subject: [PATCH] * frame.c (get_frame_arch): Abort if called with NULL this_frame. --- gdb/ChangeLog | 4 ++++ gdb/frame.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 928e7601a49..5a8f5d3d83f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-01-15 Ulrich Weigand + + * frame.c (get_frame_arch): Abort if called with NULL this_frame. + 2009-01-15 Ulrich Weigand * value.h (address_of_variable): Add prototype. diff --git a/gdb/frame.c b/gdb/frame.c index 06dcf22dca5..a46b6268d26 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1795,6 +1795,11 @@ safe_frame_unwind_memory (struct frame_info *this_frame, struct gdbarch * get_frame_arch (struct frame_info *this_frame) { + /* In the future, this function will return a per-frame + architecture instead of current_gdbarch. Calling the + routine with a NULL value of this_frame is a bug! */ + gdb_assert (this_frame); + return current_gdbarch; } -- 2.30.2