<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 26/05/2016 06:31, Dennis wrote:<br>
    </div>
    <blockquote cite="mid:57468A37.9010705@avidsoft.com.hk" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <font size="+1">I am using Lazarus 1.7 (2016-04-20) with FPC 3.1.1<br>
        <br>
        Great Work guys!<br>
        <br>
        However, the gdb that comes with it is not as good.  I know
        debugger is hard to write so I am not blaming it.<br>
        I just hope someone can share some tips or settings tricks that
        I can, perhaps, make it work better?<br>
        <br>
        e.g. it is very slow and its speed is not stable.<br>
        Sometimes, it is extremely slow or even stall the execution of
        the main program.  But when I delete all breakpoints and restart
        it and add back the breakpoints, it runs faster.</font><br>
    </blockquote>
    <br>
    OS, bitness?<br>
    <br>
    For windows we have alternative gdb versions on our Source forge
    site. They might improve stability.<br>
    <br>
    try dwarf (ensure you also do that for all packages).<br>
    My tests (on windows) show that gdb 7.11 has massive issues with
    stabs.<br>
    <br>
    Also on windows, 7.7 was the most stable. All above becomes less
    stable. More crashes<br>
    7.7 has one bug mixing records and classes.... there is a list of
    some gdb issuse on
    <a class="moz-txt-link-freetext" href="http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips">http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips</a><br>
    <br>
    Speed (for watch evaluation): Use fpdebug (install the package). But
    it is still early beta, maybe alpha. And it does not work with
    generics.<br>
    <br>
    Antivirus: <br>
    I run AVG and have no issues. I did exclude gdb and my lazarus
    project directory.<br>
    <br>
    --------------------<br>
    As for what watches can be evaluated.... That problem is much deeper
    than gdb.<br>
    <br>
    correct scoping. (unit order for globals, if several used units have
    a global var of the same name). <br>
    dwarf (2 and 3, not sure about newer) do not support that. so fpc
    doesnt even include the info in the exe.<br>
    <br>
    properties<br>
    same dwarf (2 and 3, not sure about newer) do not support that.<br>
    <br>
    function calls. that is gdb. so fpdebug could learn that. but it
    still would not know what function a property maps to.<br>
    <br>
    properties/functions that return string or dyn-array(managed type)
    or take them as argument.<br>
    dwarf (2 and 3, not sure about newer) do not support that. There is
    on spec how to get/discard the managed type, so leak and crashes
    would happen.<br>
    <br>
    All in all, even with a debugger written for pascal, there would be
    many issues left.<br>
    Newer dwarf might have solved some, or fpc could add custom tags
    only for the "custom fpc debugger"<br>
    <br>
    <br>
    <br>
  </body>
</html>