www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - (not so OT) How to set a breakpoint in ddbg specifying an absolute

reply Ary Manzana <ary esperanto.org.ar> writes:
Today I downloaded my own plugin at work to show it to some coworkers, 
and found out that the debuggers doesn't work if the absolute path to 
the files contains whitespaces.

In Ddbg the fix is to use double quotes
-> bp "C:/hi bye/main.d":8

In Gdb, however:
(gdb) break "C:/hi bye/main.d":8
No source file named C:/hi bye/main.d":8

Single quotes doesn't work either.

Does anyone know how to do that? I could specify the relative path, but 
if I have several source paths it's easier just to use the abosulte one.
May 08 2007
next sibling parent "David B. Held" <dheld codelogicconsulting.com> writes:
Ary Manzana wrote:
 Today I downloaded my own plugin at work to show it to some coworkers, 
 and found out that the debuggers doesn't work if the absolute path to 
 the files contains whitespaces.
 
 In Ddbg the fix is to use double quotes
 -> bp "C:/hi bye/main.d":8
 
 In Gdb, however:
 (gdb) break "C:/hi bye/main.d":8
 No source file named C:/hi bye/main.d":8
 
 Single quotes doesn't work either.
 
 Does anyone know how to do that? I could specify the relative path, but 
 if I have several source paths it's easier just to use the abosulte one.
My guess is that you can escape the spaces with backslashes:
 (gdb) break "C:/hi\ bye/main.d":8
Ugly, but probably doable. A good reason not to use spaces in pathnames. ;) Dave
May 08 2007
prev sibling parent reply Jascha Wetzel <"[firstname]" mainia.de> writes:
try
break "C:/hi bye/main.d:8"

Ary Manzana wrote:
 Today I downloaded my own plugin at work to show it to some coworkers,
 and found out that the debuggers doesn't work if the absolute path to
 the files contains whitespaces.
 
 In Ddbg the fix is to use double quotes
 -> bp "C:/hi bye/main.d":8
 
 In Gdb, however:
 (gdb) break "C:/hi bye/main.d":8
 No source file named C:/hi bye/main.d":8
 
 Single quotes doesn't work either.
 
 Does anyone know how to do that? I could specify the relative path, but
 if I have several source paths it's easier just to use the abosulte one.
May 09 2007
parent Ary Manzana <ary esperanto.org.ar> writes:
Thanks Jascha! It works!

Jascha Wetzel escribió:
 try
 break "C:/hi bye/main.d:8"
 
 Ary Manzana wrote:
 Today I downloaded my own plugin at work to show it to some coworkers,
 and found out that the debuggers doesn't work if the absolute path to
 the files contains whitespaces.

 In Ddbg the fix is to use double quotes
 -> bp "C:/hi bye/main.d":8

 In Gdb, however:
 (gdb) break "C:/hi bye/main.d":8
 No source file named C:/hi bye/main.d":8

 Single quotes doesn't work either.

 Does anyone know how to do that? I could specify the relative path, but
 if I have several source paths it's easier just to use the abosulte one.
May 09 2007