public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug dap/30820] New: Error when bypassing "source" to breakpoint
@ 2023-09-04  8:20 artem.sokolovskii at qt dot io
  2023-09-04  8:36 ` [Bug dap/30820] DAP GDB: Getting an error " artem.sokolovskii at qt dot io
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: artem.sokolovskii at qt dot io @ 2023-09-04  8:20 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

            Bug ID: 30820
           Summary: Error when bypassing "source" to breakpoint
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dap
          Assignee: unassigned at sourceware dot org
          Reporter: artem.sokolovskii at qt dot io
  Target Milestone: ---

I updated my gdb sources and built it today. I found out that breakpoint
structure was changed for gdb dap. Before it works correctly I could add
"source" field to "Breakpoint" structure(as it is written in the
dochttps://microsoft.github.io/debug-adapter-protocol/specification#Types_Breakpoint).
But now I shouldn't do this otherwise I'm not able to set breakpoints with an
error "gdb.dap.breakpoint._rewrite_src_breakpoint() got multiple values for
keyword argument 'source".
Could you please do as it was before?

Log:
How it works now. wo "source" field.
qtc.dbg.dapengine: "Content-Length:
166\r\n\r\n{\"arguments\":{\"breakpoints\":[{\"line\":16}],\"source\":{\"path\":\"/home/artem/work/testproj/untitled/mainwindow.cpp\"}},\"command\":\"setBreakpoints\",\"seq\":15,\"type\":\"request\"}"

How it worked before. with "source" field according to documentation. 
qtc.dbg.dapengine: "Content-Length:
260\r\n\r\n{\"arguments\":{\"breakpoints\":[{\"line\":16,\"source\":{\"name\":\"mainwindow.cpp\",\"path\":\"/home/artem/work/testproj/untitled/mainwindow.cpp\"}}],\"source\":{\"path\":\"/home/artem/work/testproj/untitled/mainwindow.cpp\"}},\"command\":\"setBreakpoints\",\"seq\":15,\"type\":\"request\"}"
qtc.dbg.dapengine: insertBreakpoint 1 "1"
qtc.dbg.dapengine: "Content-Length: 207\r\n\r\n{\"request_seq\": 15, \"type\":
\"response\", \"command\": \"setBreakpoints\", \"success\": false, \"message\":
\"gdb.dap.breakpoint._rewrite_src_breakpoint() got multiple values for keyword
argument 'source'\", \"seq\": 177}"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
@ 2023-09-04  8:36 ` artem.sokolovskii at qt dot io
  2023-09-04 17:53 ` tromey at sourceware dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: artem.sokolovskii at qt dot io @ 2023-09-04  8:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

Artem Sokolovskii <artem.sokolovskii at qt dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Error when bypassing        |DAP GDB: Getting an error
                   |"source" to breakpoint      |when bypassing "source" to
                   |                            |breakpoint

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
  2023-09-04  8:36 ` [Bug dap/30820] DAP GDB: Getting an error " artem.sokolovskii at qt dot io
@ 2023-09-04 17:53 ` tromey at sourceware dot org
  2023-09-05  8:00 ` artem.sokolovskii at qt dot io
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-09-04 17:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-09-04
                 CC|                            |tromey at sourceware dot org
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
set_breakpoint does:

        specs = [_rewrite_src_breakpoint(source=source, **bp) for bp in
breakpoints]

but if 'bp' has a 'source' entry then this will cause the clash.

While we should probably fix this, at the same time I'm not sure this
is expected.  setBreakpoints takes an array of SourceBreakpoint objects,
not Breakpoint objects.  And SourceBreakpoint doesn't mention "source".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
  2023-09-04  8:36 ` [Bug dap/30820] DAP GDB: Getting an error " artem.sokolovskii at qt dot io
  2023-09-04 17:53 ` tromey at sourceware dot org
@ 2023-09-05  8:00 ` artem.sokolovskii at qt dot io
  2023-09-05 13:00 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: artem.sokolovskii at qt dot io @ 2023-09-05  8:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

--- Comment #2 from Artem Sokolovskii <artem.sokolovskii at qt dot io> ---
Yeah, You are right about SourceBreakpoint. Then it is not relevant.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
                   ` (2 preceding siblings ...)
  2023-09-05  8:00 ` artem.sokolovskii at qt dot io
@ 2023-09-05 13:00 ` tromey at sourceware dot org
  2023-09-05 13:55 ` artem.sokolovskii at qt dot io
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-09-05 13:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2023-September/202153.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
                   ` (3 preceding siblings ...)
  2023-09-05 13:00 ` tromey at sourceware dot org
@ 2023-09-05 13:55 ` artem.sokolovskii at qt dot io
  2023-09-12 16:37 ` cvs-commit at gcc dot gnu.org
  2023-09-12 16:37 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: artem.sokolovskii at qt dot io @ 2023-09-05 13:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

--- Comment #4 from Artem Sokolovskii <artem.sokolovskii at qt dot io> ---
Thanks:) Idk Should I close the bug or someone else should do this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
                   ` (4 preceding siblings ...)
  2023-09-05 13:55 ` artem.sokolovskii at qt dot io
@ 2023-09-12 16:37 ` cvs-commit at gcc dot gnu.org
  2023-09-12 16:37 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-12 16:37 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f8ab027008863bd06513053ea9f84e1116c1cf73

commit f8ab027008863bd06513053ea9f84e1116c1cf73
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Sep 5 06:55:54 2023 -0600

    Avoid spurious breakpoint-setting failure in DAP

    A user pointed out that if a DAP setBreakpoints request has a 'source'
    field in a SourceBreakpoint object, then the gdb DAP implementation
    will throw an exception.

    While SourceBreakpoint does not allow 'source' in the spec, it seems
    better to me to accept it.  I don't think we should fully go down the
    "Postel's Law" path -- after all, we have the type-checker -- but at
    the same time, if we do send errors, they should be intentional and
    not artifacts of the implementation.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30820

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug dap/30820] DAP GDB: Getting an error when bypassing "source" to breakpoint
  2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
                   ` (5 preceding siblings ...)
  2023-09-12 16:37 ` cvs-commit at gcc dot gnu.org
@ 2023-09-12 16:37 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-09-12 16:37 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30820

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |14.1
         Resolution|---                         |FIXED

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-12 16:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04  8:20 [Bug dap/30820] New: Error when bypassing "source" to breakpoint artem.sokolovskii at qt dot io
2023-09-04  8:36 ` [Bug dap/30820] DAP GDB: Getting an error " artem.sokolovskii at qt dot io
2023-09-04 17:53 ` tromey at sourceware dot org
2023-09-05  8:00 ` artem.sokolovskii at qt dot io
2023-09-05 13:00 ` tromey at sourceware dot org
2023-09-05 13:55 ` artem.sokolovskii at qt dot io
2023-09-12 16:37 ` cvs-commit at gcc dot gnu.org
2023-09-12 16:37 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).