octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Changeset]: Re: Problem with dbstep


From: David Bateman
Subject: [Changeset]: Re: Problem with dbstep
Date: Wed, 09 Jul 2008 18:11:47 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

John W. Eaton wrote:
> On  9-Jul-2008, David Bateman wrote:
>
> | Looking at the backtrace I assume that this is with a recent HG build..
> | Note that there were changes commited to the repository yesterday that
> | relate to these aspects. However, just testing this example it crashes
> | before and after applying these changes.
> | 
> | The fix is clearly that the pt-bp.h (MAYBE_DO_BREAKPOINT) macro has to
> | recognize that ta function is returning and not break or decrement its
> | counters. However, I'm not sure how that should be implemented. JWE what
> | is the means to check whether a function is returning in this macro?
>
> Yes, we need to decide what should happen when we are at the end of a
> function and there is no next line to step to.  As a temporary fix, it
> might be OK to just not allow stepping, but I think it would be
> better to step to the next line in the calling function (if any) or
> back to the top level prompt.  But I don't really understand the
> debugging code very well, and I don't know what the proper fix is.
>
> Also, I noticed that for the example function (which takes an argument)
>
>   dbstop test
>   test
>   dbstep
>
> also crashes Octave when it tries to print the error message and I
> don't know what the proper fix is for that either.
>   
Forget it. The fix is easy.. As far as I see we shouldn't be testing for
a breakpoint for the lvalue or rvalue of a function definition. Just
removing the MAYBE_DO_BREAKPOINT from pt-id.cc fixes the issue. Patch
attached.

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

# HG changeset patch
# User David Bateman <address@hidden>
# Date 1215619791 -7200
# Node ID 42d92afd9fa2be9716c2e424f189d067b0b47f68
# Parent  c7fa906e597358bd6a2f11bafc457b317b6b6f76
Fix seg-fault for dbstep at end of function

diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@ 2008-07-08  John W. Eaton  <address@hidden
+2008-07-09  David Bateman  <address@hidden>
+
+       * pt-id.cc (octave_value_list tree_identifier::rvalue (int), 
+       octave_lvalue tree_identifier::lvalue (void)): Remove 
+       MAYBE_DO_BREAKPOINT.
+
 2008-07-08  John W. Eaton  <address@hidden>
 
        * graphics.h.in (axes::properties::keypos): Declare as
diff --git a/src/pt-id.cc b/src/pt-id.cc
--- a/src/pt-id.cc
+++ b/src/pt-id.cc
@@ -57,8 +57,6 @@ tree_identifier::rvalue (int nargout)
 {
   octave_value_list retval;
 
-  MAYBE_DO_BREAKPOINT;
-
   if (error_state)
     return retval;
 
@@ -117,8 +115,6 @@ octave_lvalue
 octave_lvalue
 tree_identifier::lvalue (void)
 {
-  MAYBE_DO_BREAKPOINT;
-
   return octave_lvalue (&(xsym().varref ()));
 }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]