[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: Review Request: Add Thread and Frame Information on Execution
From:       "Niko Sams" <niko.sams () gmail ! com>
Date:       2012-07-21 7:40:48
Message-ID: 20120721074048.28935.20854 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On June 18, 2012, 12:30 p.m., Milian Wolff wrote:
> > could you please create a unit test for that in the gdb plugin? I guess that \
> > should be possible following the steps you outlined above
> 
> David Narváez wrote:
> How should I write the unit test? Using the breakpoint.kdevelop file found in the \
> tests folder or using the new Unit Test feature in KDevelop? 
> Milian Wolff wrote:
> no, see e.g. kdevelop/debuggers/gdb/unittests/gdbtest.cpp
> 
> David Narváez wrote:
> I'm having trouble designing the unit test for this. I'm thinking I need to check \
> that the thread and frame information of a BreakInsert command are added during the \
> execCmd method but there's no way to check the internal queue from the unit test. \
> Can somebody help me design the test?

Can't you test the actual result? Like a variable value (which has the wrong value if \
the wrong --thread or --frame is used.


- Niko


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105210/#review14828
-----------------------------------------------------------


On June 10, 2012, 11:23 p.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105210/
> -----------------------------------------------------------
> 
> (Updated June 10, 2012, 11:23 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> Moved the code that adds frame and thread information when not present in the \
> command already from the queueCmd method to the executeCmd method and added some \
> info at the debug strings to make clear that the queued command will be modified \
> upon execution. This is needed in order to be able to queue commands whose \
> information depend on previous commands in the same queue. 
> 
> This addresses bug 301287.
> http://bugs.kde.org/show_bug.cgi?id=301287
> 
> 
> Diffs
> -----
> 
> debuggers/gdb/debugsession.cpp ed3598e 
> 
> Diff: http://git.reviewboard.kde.org/r/105210/diff/
> 
> 
> Testing
> -------
> 
> 1. Set up a breakpoint in a debug project
> 2. Add a variable to the watch list
> 3. Check the debugging output about the queued command and executed command.
> 
> Previously, these two would be the same. After this patch, the executed command has \
> the --thread and --frame parameters. 
> 
> Thanks,
> 
> David Narváez
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/105210/">http://git.reviewboard.kde.org/r/105210/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 18th, 2012, 12:30 p.m., <b>Milian \
Wolff</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">could you please create a unit test for that in the gdb plugin? I guess \
that should be possible following the steps you outlined above</pre>  </blockquote>




 <p>On June 19th, 2012, 5:24 a.m., <b>David Narváez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">How should I write the \
unit test? Using the breakpoint.kdevelop file found in the tests folder or using the \
new Unit Test feature in KDevelop?</pre>  </blockquote>





 <p>On June 19th, 2012, 8:27 a.m., <b>Milian Wolff</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">no, see e.g. \
kdevelop/debuggers/gdb/unittests/gdbtest.cpp</pre>  </blockquote>





 <p>On July 19th, 2012, 11:49 a.m., <b>David Narváez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;m having trouble \
designing the unit test for this. I&#39;m thinking I need to check that the thread \
and frame information of a BreakInsert command are added during the execCmd method \
but there&#39;s no way to check the internal queue from the unit test. Can somebody \
help me design the test?</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can&#39;t you test the \
actual result? Like a variable value (which has the wrong value if the wrong --thread \
or --frame is used.</pre> <br />








<p>- Niko</p>


<br />
<p>On June 10th, 2012, 11:23 p.m., David Narváez wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for KDevelop.</div>
<div>By David Narváez.</div>


<p style="color: grey;"><i>Updated June 10, 2012, 11:23 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Moved the code that adds frame and thread information when not present \
in the command already from the queueCmd method to the executeCmd method and added \
some info at the debug strings to make clear that the queued command will be modified \
upon execution. This is needed in order to be able to queue commands whose \
information depend on previous commands in the same queue.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">1. Set up a breakpoint in a debug project 2. Add a variable to the watch \
list 3. Check the debugging output about the queued command and executed command.

Previously, these two would be the same. After this patch, the executed command has \
the --thread and --frame parameters.</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=301287">301287</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>debuggers/gdb/debugsession.cpp <span style="color: grey">(ed3598e)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105210/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic