Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

break "filename:line" will not work in the futher gdb

<< < (4/6) > >>

oBFusCATed:

--- Quote from: ollydbg on April 06, 2012, 02:13:35 am ---This should be easy.  :)

--- End quote ---
Are you sure? I doubt pretty much.
But anyway patches welcome, but you have to test them a lot. Path with space, path with ::, linux, windows, etc...

ollydbg:
I have build gdb cvs 2012-04-07, I use PCX's gcc 4.6.3.
also I change the break command send from c::b to

--- Code: ---break "filename":line

--- End code ---

I have a cbp project which I put in a folder name contains spaces, You can see the debug log:


--- Quote ---Starting debugger: E:\code\gcc\myPCXMinGW463\bin\gdb.exe -nx -fullname  -quiet  -args E:/code/cb/TEST_C~1/SPACEF~1/hi/bin/Debug/hi.exe
done

[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!

Setting breakpoints

[debug]Reading symbols from E:\code\cb\TEST_C~1\SPACEF~1\hi\bin\Debug\hi.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.4.50.20120407-cvs
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.4.50.20120407-cvs

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source E:\code\gcc\myPCXMinGW463\bin\my.gdb

[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> directory E:/code/cb/TEST_C~1/SPACEF~1/hi/
[debug]Source directories searched: E:/code/cb/TEST_C~1/SPACEF~1/hi;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "E:/code/cb/test_code/space folder/hi/main.cpp":7
[debug]Breakpoint 2 at 0x4013de: file E:\code\cb\test_code\space folder\hi\main.cpp, line 7.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: E:\code\cb\TEST_C~1\SPACEF~1\hi\bin\Debug\hi.exe
[debug]gdb: windows_init_thread_list

Child process PID: 3796

[debug][New Thread 3796.0x2e4]
[debug]Breakpoint 2, main () at E:\code\cb\test_code\space folder\hi\main.cpp:7
[debug]E:\code\cb\test_code\space folder\hi\main.cpp:7:62:beg:0x4013de
[debug]>>>>>>cb_gdb:

At E:\code\cb\test_code\space folder\hi\main.cpp:7

[debug]> set debugevents off
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]E:\code\cb\test_code\space folder\hi\main.cpp:8:99:beg:0x401402
[debug]>>>>>>cb_gdb:


--- End quote ---

You can see, the breakpoint hit correctly, and next command also works OK.

PS: I have not quite familiar with Linux, so I can only test under Windows.

oBFusCATed:
What about gdb7.4 (non-cvs) and gdb7.3/2/1 or 6.8 (don't care too much btw)?

ollydbg:
First Patch:
https://developer.berlios.de/patch/?func=detailpatch&patch_id=3274&group_id=5358

This will let C::B support gdb(cvs, 7.5), and preserve the old gdb ( gdb7.4-gdb6.8 )  compatibility.

See my explanation in gdb maillist:
http://sourceware.org/ml/gdb-patches/2012-03/msg00899.html

oBFusCATed:
Please add a line which demonstrates what kind of lines matches the new regex, because I'm not really sure.

Also your patch doesn't change the setting of breakpoints, why?

p.s. I guess you wanted to use preserve instead of deserve?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version