Browse Prior Art Database

Mercurial Conditional Breakpoints Mechanism within Debugger

IP.com Disclosure Number: IPCOM000187563D
Original Publication Date: 2009-Sep-11
Included in the Prior Art Database: 2009-Sep-11
Document File: 1 page(s) / 37K

Publishing Venue

IBM

Abstract

A method is disclosed for providing mercurial conditional breakpoints mechanism within a debugger.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 63% of the total text.

Page 1 of 1

Mercurial Conditional Breakpoints Mechanism within Debugger

Mercurial Conditional Breakpoints Mechanism within DebuggerMercurial Conditional Breakpoints Mechanism within Debugger

For example consider the following program:

main( int argc , char * argv [] ) { int x = argc;

if (x>10) functionOne(x); function Two(); }

function void functionOne(int x) { x++;
printf("Function One");
}

function void functionTwo() { printf("Function two");
}

If the programmer wishes to stop at the line printf("Function Two"); only if the "(x)" inside functionOne is greater than 10.

There is no way to do that currently, because function Two has no knowledge of the " (x) " inside functionOne. In fact, functionTwo would not even know if functionOne is ever called . Currently, at best, the programmer can always call a breakpoint at the "printf" statement in functionTwo. This problem cannot be solved by state-of-the-art compilers. since users cannot set conditional breakpoints that break on this line if a particular variable satisfies a certain condition because user does not have access to that variable from a static context. This is as a result of breakpoints being code line centric .

Making the code line segment a variable centric, can solve this problem. For each line that variable "( x)" is assigned, the value could be changed, allowing the setting of a set of breakpoints., In the example above, at the line that includes " x++", it the breakpoint ca...