<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 25/04/2026 19:31, Tomas Hajny via
      fpc-devel wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:E919EC2C-1462-4B52-AF44-81BDC15A619E@hajny.biz">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Actually, what debuggers are used by core team members? Anyone still using gdb in some cases (including OOP targets?)
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre"> .
 .

Not sure what is meant with OOP in this context, but there's no other option for OS/2 than GDB with stabs (not because there wouldn't be other debuggers available, but because neither me nor anybody else managed to provide support for them (since it wouldn't be "just" implementing support for something else, but rather to solve a bunch of other issues first - at least different object format and different linker).

</pre>
    </blockquote>
    <br>
    I was wondering if it is an issue just with the GDB I have or a
    general issue.<br>
    <br>
    Though, I did not test stabs.<br>
    <br>
    There is some old, incorrect DWARF code that generates wrong info
    for <br>
      type TFoo = class<br>
        public const X = 1;<br>
      end;<br>
    <br>
    And, that causes an assert failure in gdb (at least mine). <br>
    <br>
    But, that never was a big issue => likely no one ever spotted it,
    because such constants are rare.<br>
    Or well, used to be.<br>
    <br>
    Now TObject itself (in 331) has one of them. And gdb gives an issue.<br>
    <br>
    Then again, no one seems to have been bothered by it (other than me
    occidentally stumbling on it). Because<br>
    - I saw no mention<br>
    - I saw no attempt to fix it<br>
    <br>
    So I wasn't sure, maybe my GDB is just bad...<br>
    <br>
    Try above, with DWARF.<br>
    To inspect the variable<br>
      var MyFoo: TFoo; //MyFoo:= TFoo.create;<br>
    <br>
    in GDB<br>
      p MyFoo^<br>
    <br>
    without deref, gdb only prints the address.<br>
    <br>
    ---------------------<br>
    There are various fixes.<br>
    <br>
    remove those constants completely from DWARF => but I don't know
    if that is object/record only.  This may be some other <br>
    <br>
    TDebugInfoDwarf.enum_membersyms_callback => which is called in a
    few places<br>
    calls<br>
    TDebugInfoDwarf.appendsym_const_member<br>
    which adds<br>
              append_entry(DW_TAG_member,false,<br>
    <br>
    That looks like in classes/records only... <br>
    <br>
    ------------------<br>
    Alternatively make it dependent on godwarfcpp<br>
    Because, despite it being wrong => FpDebug deals with it.<br>
    <br>
    (And even one of the DWARF maintainers (I think it was) has recently
    (on a diff subject) told me: <br>
     If the debugger can read it, just use tags/attribs that aren't
    meant in that place.<br>
    <br>
    But, I think that wouldn't be worth it.... Just go with the below
    instead.<br>
    <br>
    --------------<br>
    And of course, lets do DWARF 5<br>
    Because there is an official solution.<br>
    <br>
    And for constants it works with GDB (I think, I done a ton of diff
    testing, so hope not to mix up results)<br>
    <br>
    For "class var" also official supported, GDB fails...<br>
    <br>
    Latest GDB has lots of "for each language C, Pascal, ...", and that
    broke some previously working stuff... <br>
    <br>
    <br>
  </body>
</html>