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

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

(1/6) > >>

ollydbg:
Hi, OBF, see this post:
http://sourceware.org/ml/gdb-patches/2012-03/msg00823.html

I have some discussion with gdb developers, and after the line specification rewrite, the command break "filename:line" will not work anymore, can we use this command with out "quotes" like:


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

--- End code ---

I think it was easy to change in debugger plugin, right?

ollydbg:
It this the only place I have to change? in file: gdb_commands.h

--- Code: ---class GdbCmd_AddBreakpoint : public DebuggerCmd
{
        DebuggerBreakpoint::Pointer m_BP;
    public:
        /** @param bp The breakpoint to set. */
        GdbCmd_AddBreakpoint(DebuggerDriver* driver, DebuggerBreakpoint::Pointer bp)
            : DebuggerCmd(driver),
            m_BP(bp)
        {
            // gdb doesn't allow setting the bp number.
            // instead, we must read it back in ParseOutput()...
            m_BP->index = -1;

            if (m_BP->enabled)
            {
                if (m_BP->type == DebuggerBreakpoint::bptCode)//m_BP->func.IsEmpty())
                {
                    wxString out = m_BP->filename;
                    // we add one to line,  because scintilla uses 0-based line numbers, while gdb uses 1-based
                    if (!m_BP->temporary)
                        m_Cmd << _T("break ");
                    else
                        m_Cmd << _T("tbreak ");
                    m_Cmd << _T('"') << out << _T(":") << wxString::Format(_T("%d"), m_BP->line) << _T('"');

--- End code ---

oBFusCATed:
Probably.
What version of gdb has this feature? 7.4?

ollydbg:

--- Quote from: oBFusCATed on March 25, 2012, 11:22:21 am ---Probably.

--- End quote ---
I just remove the double-quote in the break command, and now setting bp works OK under c::b, but it looks like the removing bp works badly, maybe, the parsing output method should be changed also.

--- Quote ---What version of gdb has this feature? 7.4?

--- End quote ---
This new feature is tested by one gdb developer(in his git gdb branch), I think it will be merged to the main trunk some days later. gdb 7.4 has already released(they won't add any new feature in the 7.4 branch), so I believe it will happen in gdb 7.5.

EDIT: As the change will break many IDE front end, I think there will be further discussions in gdb maillist.


oBFusCATed:
If it is not an official release, you're on your own, sorry. No time to support random gdb-testing-versions.

Navigation

[0] Message Index

[#] Next page

Go to full version