This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Get rid of stop_pc (was: [RFA] dummy frame handling cleanup, plus inferior fun call signal handling improvement)


On Friday 05 December 2008 01:49:02, Doug Evans wrote:

> Nit.
> 
> The check for !frame isn't related to removing stop_pc.  Separate
> patch or add a changelog entry?

Oops, sorry.  That is dead code.  There is always a frame nowadays.
get_current_frame either returns a frame, or throws --- never
returns NULL.

I've checked in the below.

-- 
Pedro Alves
2008-12-05  Pedro Alves  <pedro@codesourcery.com>

	* infcmd.c (step_once): Remove dead code.

---
 gdb/infcmd.c |    2 --
 1 file changed, 2 deletions(-)

Index: src/gdb/infcmd.c
===================================================================
--- src.orig/gdb/infcmd.c	2008-12-05 01:57:41.000000000 +0000
+++ src/gdb/infcmd.c	2008-12-05 02:00:17.000000000 +0000
@@ -928,8 +928,6 @@ step_once (int skip_subroutines, int sin
       clear_proceed_status ();
 
       frame = get_current_frame ();
-      if (!frame)		/* Avoid coredump here.  Why tho? */
-	error (_("No current frame"));
       tp->step_frame_id = get_frame_id (frame);
 
       if (!single_inst)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]