25 Jul 2011 19:47
Setting a breakpoint at a line number and character offset
andy_westken <andy_westken <at> hotmail.com>
2011-07-25 17:47:15 GMT
2011-07-25 17:47:15 GMT
Hi
I apologise if this question has been answered elsewhere, but my web
searches were swamped by noise...
Is is possible to get gdb to set a breakpoint at a line number and a
character offset (or column) on the line?
From what I understand, this is not possible (at least for Ubuntu and
GnuWin32 versions of the debugger). But I wanted to cross-check before using
this to justify an item in some coding conventions.
Thanks, Andy
P.S. My contention is that code of the following form is intrinsically evil,
from a debugging perspective.
if(condition) function1() else function2();
whereas
if(condition)
function1()
else
function2();
is debuggable!
--
--
View this message in context: http://old.nabble.com/Setting-a-breakpoint-at-a-line-number-and-character-offset-tp32133893p32133893.html
(Continue reading)
.
>
> if(condition) function1() else function2();
I guess you could do something like:
RSS Feed