Sign in Join
Wiki copytemporary

GDB Debugger Tips: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: GDB Debugger Tips

OldNewLine
1+## Introduction
2+
3+Lazarus comes with [[GDB]] as default debugger. From Lazarus 2.0 onwards, this default has changed to LLDB on MacOs.
4+
5+- This page is for Lazarus 1.0 and newer. For older versions see \[ previous version of this page\]
6+- <u>Note on GDB 7.5</u>: GDB 7.5 is not supported by the released 1.0. Fixes to support it were made in 1.1.
7+
8+## See also
9+
10+### Setup (GDB and LLDB)
11+
12+To get the best possible results, you must ensure that your IDE and Project are both correctly configured.
13+
14+See [[Debugger Setup]] how to set up the IDE and your project in order to use the debugger.
15+
16+[Setup Video Tutorial](http://www.youtube.com/watch?v=cf4G06k2YL8)
17+
18+### Other
19+
20+- [[Debugger Console App|Debugging console applications]]
21+- [[Debugger Status|Overview and Status of debugger-backends in Lazarus]]
22+
23+## General
24+
25+### Debug Info Type (GDB and LLDB)
26+
27+> **Note:** Those setting apply only to the project or package to which they are set. If changing settings in either project or package options, it should be ensured that this is done for **all** packages and the project.\
28+> Otherwise your project will have mixed debug info, which can lead to a degraded debug experience.\
29+> The setting can be applied to project and packages using [[IDE Window: Compiler Options|Additions and Overrides]]
30+
31+> **Note:** When compiling <b><u>32Bit</u></b> apps (native or cross) FPC defaults to "Stabs" (At least on some OS). It is recommended to change your configuration to "Dwarf".
32+
33+For 64 bit applications, FPC supports only "Dwarf". (Older FPC also support "Stabs", but that is not recommended)
34+
35+<table>
36+
37+<tr valign="top">
38+
39+<td>
40+
41+### Stabs (only GDB)
42+
43+</td>
44+
45+<td>
46+
47+-g or -gs
48+
49+You should only use if your gdb version does not support dwarf. There are very few other cases where you need it.
50+
51+You may need it with "var param" (param by ref) procedure foo(var a: integer); However the IDE deals with this in 99% of all cases.
52+
53+The LLDB based debugger does not support Stabs
54+
55+</td>
56+
57+</tr>
58+
59+<tr valign="top">
60+
61+<td>
62+
63+#### Dwarf (GDB and LLDB)
64+
65+</td>
66+
67+<td>
68+
69+##### Dwarf 2 (-gw)
70+
71+This sets the format to Dwarf2. This is the most basic dwarf setting.
72+
73+##### Dwarf 2 with sets (-gw -godwarfsets)
74+
75+This setting adds the ability to inspect sets: "type TFoo=set of (a,b,c);". This is borrowed from the Dwarf 3 specs, but supported by most versions of GDB (any GDB from version 7 upwards should do).
76+
77+**`This is the recommended setting.`**` `
78+
79+##### Dwarf 3 (-gw3)
80+
81+Dwarf 3 can encode additional info for some types (such as strings and arrays). It also preserves the case of identifiers in the debug info.
82+
83+However there are still issues with the produced debug info. Some info may be incorrectly encoded, and other is not understood by GDB. In some cases this can lead to <u>gdb crashing</u>. This setting can be used, when using the FpDebug based debugger (add on package for the IDE)
84+
85+</td>
86+
87+</tr>
88+
89+<tr valign="top">
90+
91+<td>
92+
93+#### Differences
94+
95+</td>
96+
97+<td>
98+
99+This list is in no way complete:
100+
101+- dwarf allows some properties (those directly mapped to a field)
102+- stabs (and modern gdb) can do -gp (preserve the case of symbols, instead of getting the all caps stuff).
103+- stabs has problems with some class type casts. The IDE fixes that in some cases. (Only affects gdb 7.0 and up) [1](http://bugs.freepascal.org/view.php?id=19920)
104+
105+</td>
106+
107+</tr>
108+
109+</table>
110+
111+### Inspecting data types (Watch/Hint)
112+
113+<table>
114+
115+<tr valign="top">
116+
117+<td>
118+
119+#### Strings
120+
121+</td>
122+
123+<td>
124+
125+GDB does not know the Pascal string data type. The type information GDB returns does not currently allow for the IDE to differentiate between a PChar (index is 0 based) or a String (index is 1 based).
126+
127+As a Result "mystring\[10\]" could be the 10th char in a string, or 11th in a PChar.
128+
129+Because the IDE cannot be sure which one applies, it will show both. The 2 results will be prefixed String/PChar.
130+
131+</td>
132+
133+</tr>
134+
135+<tr valign="top">
136+
137+<td>
138+
139+#### Properties
140+
141+</td>
142+
143+<td>
144+
145+Currently the debugger does not support any method execution. Therefore only properties that refer directly to a variable can be inspected. (This only works if using dwarf)
146+
147+``` pascal
148+TFoo = Class
149+private
150+ FBar: Integer;
151+ function GetValue: Integer;
152+public
153+ property Bar: Integer read FBar; // Can be inspected (if Dwarf is used)
154+ property Value: Integer read GetValue; // Can *not* be inspected
155+end;
156+```
157+
158+</td>
159+
160+</tr>
161+
162+<tr valign="top">
163+
164+<td>
165+
166+#### Nested Procedures / Function
167+
168+</td>
169+
170+<td>
171+
172+``` pascal
173+procedure SomeObject.Outer(NumText: string);
174+var
175+ OuterVarInScope: Integer;
176+
177+procedure Nested;
178+var
179+ I: Integer;
180+begin
181+ WriteLn(OuterVarInScope);
182+end;
183+
184+var
185+ OuterVarOutsideScope: Integer;
186+
187+begin
188+ Nested;
189+end;
190+```
191+
192+If you step into "Nested", then the IDE allows you to inspect variables from both stack frames.
193+
194+This is you can inspect: I, OuterVarInScope, NumText (without having to change the current stack frame, in the stack window)
195+
196+However there are some caveats:
197+
198+You can also inspect: OuterVarOutsideScope. That is against Pascal scoping rules. This only matters if you have several nested levels, and they all contain a variable of the same name, but the Pascal scoping would hide the variable from the middle frame. Then you get to see the wrong value.
199+
200+You cannot evaluate statements across the 2 frames: "OuterVarnScope-I" does not work.
201+
202+> **Warning:** You may see a wrong value. If there is in any other unit a global (or otherwise visible to GDB scoping rules) variable, with the same name as the local var from the outer frame, then that global var will be shown. There is no warning for that. The safe way is to explicitly select the outer stack frame in which the local var is defined, and check the value.
203+
204+</td>
205+
206+</tr>
207+
208+<tr valign="top">
209+
210+<td>
211+
212+#### Arrays
213+
214+</td>
215+
216+<td>
217+
218+``` pascal
219+array [x..y] of Integer;
220+```
221+
222+shows as chars, instead of int. Only gdb 7.2 or up seems to handle it correctly.
223+
224+Additionally there may be issues when using arrays of (unnamed) records.
225+
226+Dynamic Arrays will only show a limited amount of their data. As of Lazarus 1.1 the limit can be specified.
227+
228+</td>
229+
230+</tr>
231+
232+<table>
233+
234+If Watches/Hint values are not displaying correctly disable REGVARS. Set -OoNOREGVAR in "Custom Options".
235+
236+### Specifying GDB disassembly flavor
237+
238+GDB allows one to specify the assembly flavor (intel or AT&T style) to be used when displaying assembly code. If one wants to change to a specific flavor this can be changed in the AssemblerStyle property in Lazarus's debugger options for GDB (feature available from Lazarus 2.0). Alternatively (and the only way to achieve this from inside Lazarus in older versions before Lazarus 2.0) one can specify this option by passing the *set disassembly-flavor* instruction to [Debugger_Startup_options](/wiki-images/5/5d/Media%3ADbg_setup_options2.png). Several syntax variations can be used (depending on GDB version), a few variations are shown below:
239+
240+` -ex "set disassembly-flavor intel"`\
241+` --eval-command="set disassembly-flavor intel"`\
242+` -eval-command="set disassembly-flavor intel"`\
243+` --eval-command "set disassembly-flavor intel"`
244+
245+Note that it may be necessary to reset the debugger *(Run \| Reset Debugger)* before GDB will load with the new setting.
246+
247+## Windows
248+
249+### Environment and Unicode / None-Latin based locale
250+
251+GDB in combination with Lazarus can have issues, if your environment (such as Username, or PATH, or ...) contain none Latin chars.
252+
253+This is not an issue with any particular GDB version. Rather it depends on how GDB was build. To work correctly under Lazarus GDB needs to have been build using Cygwin.
254+
255+There are several builds available provided by the Lazarus team. Some of them are build with Cygwin. For 64bit: <https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/>
256+
257+For 32bit the builds have not yet been tested. <https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/>
258+
259+### Console output for GUI application
260+
261+On Windows, the IDE does not have the "Debugger - Console output" window. This is because console applications open their own console window. GUI applications by default have no console. In order to have a console for a GUI application, the compiler settings must be changed (Project options / Compiler Options / Config and Target / Win32 Gui Application: -WC / -WG)
262+
263+### Debugging applications with Administrative privileges
264+
265+On Windows Vista+, in Project Options setting the manifest file permissions for the program to "as Administrator" will run the program with Administrator privileges. If your IDE is not running as Administrator, debugging will appear to start ok, the program will show in the tasklist, but its GUI will not show.
266+
267+So please be aware that you have to match privilege level between the IDE (and gdb) and the applicationt to be debugged.
268+
269+## Win 64 bit
270+
271+- Requires Lazarus 1.0+ (with FPC 2.6+)
272+- Advised to use dwarf
273+
274+### Using 32 bit Lazarus on 64 bit Windows
275+
276+Alternatively it is possible to debug applications as 32 bit applications (using the 32bit version of gdb). Once successfully debugged:
277+
278+- the app can then be cross-compiled to 64 bit, or
279+- a 2nd Lazarus installation can be used (using a different configuration --primary-config-path option from the 32 bit Lazarus)
280+
281+When installing the 32 bit Lazarus, ensure you change configuration so the correct 32 bit FPC and GDB are used.
282+
283+### More Win 64 bit problems and solutions
284+
285+See also <http://forum.lazarus.freepascal.org/index.php/topic,13188.0/topicseen.html>
286+
287+## Win CE
288+
289+### Debugger does not find any source files
290+
291+Menu: "Tools" Page: "Debugger"/"Generic" Field: "Additional search path"
292+
293+Put your the drive letter of your project directory in this field.
294+
295+## Linux
296+
297+### Known Problems
298+
299+- There might be issues on at least some CPUs when using an old version of gdb (e.g. SPARC, with gdb 6.4 as supplied by Debian "Etch"). In particular, background threads might lock up even if the program appears to run correctly standalone.
300+- If your program appears to lock up at start up, go to Tools / Options / Debugger / General and set DisableLoadSymbolsForLibraries=True
301+
302+## macOS
303+
304+With the release of macOS 10.14 (Mojave) in 2018, **gdb** was replaced by *[[lldb]]*', and is no longer supported.
305+
306+This section is a first approach to collect information about known issues and workarounds. The information provided here depends a lot on feedback from macOS users.
307+
308+From Lazarus 2.0 onwards the IDE has an LLDB based debugger. The GDB based debugger can also be used, but requires a lot of work building and code-signing the gdb binary and is not supported.
309+
310+### Known Problems (GDB)
311+
312+#### Debugging 32 bit app on 64 bit architecture
313+
314+It is possible and maybe sometime necessary to debug a 32 bit exe on a 64 bit system.
315+
316+This is only possible with Lazarus 0.9.29 rev 28640 and up.
317+
318+#### TimeOuts (64 Bit only)
319+
320+It appears that certain commands are not correctly (or incompletely) processed by gdb 6.3.50. Normally GDB finishes each command with a "\<gdb\>" prompt for the next command. But the version provided by apple sometimes fails to do this. In this case the IDE will have to use a timeout to avoid waiting forever.
321+
322+This has been observed with:
323+
324+- Certain Watch expressions (at least if the watched variable was not available in the current selected function)
325+- Handling an Exception
326+- Inserting breakpoints (past unit end / none code location)
327+
328+It cannot be guaranteed:
329+
330+- that GDB will not later return some results from such a command
331+- that GDB's internal state is still valid
332+
333+The prompt displayed for timeouts can be switched off in the debugger config.
334+
335+Warn On Timeout
336+True/False. Auto continue, after a timeout, do not show a warning.
337+
338+TimeOutForEval
339+Set in milliseconds, how long until a timeout detection is triggered (the detection itself may take some more time.)
340+
341+You may need to "RESET" the debugger after those changes are made
342+
343+More info see here:
344+
345+- [<http://bugs.freepascal.org/view.php?id=19262#c47944>](http://bugs.freepascal.org/view.php?id=19262#c47944)
346+- <http://bugs.freepascal.org/view.php?id=21653>
347+
348+An alternative solution seems to be to use a newer version of GDB (see below).
349+
350+#### Hardware exceptions under macOS
351+
352+When a hardware exception occurs under macOS, such as an invalid pointer access (SIGSEGV) or an integer division-by-zero on Intel processors, the debugger will catch this exception at the Mach level. Normally, the system translates these Mach exceptions into Unix-style signals where the FPC run time library handles them. The debugger is however unable to propagate Mach exceptions in this way.
353+
354+The practical upshot is that it is impossible under macOS to continue a program in the debugger once a hardware exception has been triggered. This is not FPC-specific, and cannot be fixed by us.
355+
356+### Using Alternative Debuggers (GDB)
357+
358+You can install GDB 7.1 (or later) using MacPorts, fink or homebrew.
359+
360+The following observations have been made:
361+
362+- GDB 7.1 seems to have issues with the stabs debug info from fpc.
363+
364+
365+<b>Make sure you select <u>"generate dwarf debug information (-gw)"</u> on the linking tab of the <u>project options</u></b>
366+
367+**Watch out for the linker warnings about "unknown stabs"**
368+
369+
370+If you still have problems ensure that no code at all, is compiled with stabs. Your LCL may contain stabs, and this will end up in your app, even if you compile the app with -gw. So you may have to recompile your LCL with -gw (or without any debug info). Same for any other unit, package, rtl, .... that may have stabs
371+
372+**Even with those rules followed, GDB does not always work with fpc compiled apps.**
373+
374+Those observations may be incomplete or wrong, please update them, if you have more information.
375+
376+Lazarus Version 1.0 to 1.0.12
377+
378+In the debugger options configure
379+
380+` EncodeCurrentDirPath = gdfeNone`\
381+` EncodeExeFilename = gdfeNone`
382+
383+And you must use <u>"run param"</u> to specify the actual executable inside the app-bundle ( project.app/Content/MacOS/project or similar)
384+
385+In Lazarus Version 1.0.14 to 1.2 and up those steps should no longer be required.
386+
387+### Xcode 5
388+
389+Since Mavericks 10.9, Xcode 5 no longer installs gdb by default and not globally.
390+
391+- For 10.9 you can install an old Xcode 4 in parallel. This is not supported by Apple, so it might break with one of the next versions.
392+
393+- You can compile and install gdb. See [[GDB on OS X Mavericks or newer and Xcode 5 or newer]].
394+
395+Please see [issue 25157 on mantis](http://bugs.freepascal.org/view.php?id=25157)
396+
397+- <http://forum.lazarus.freepascal.org/index.php/topic,22529.0.html> - about installing Xcode 4.3
398+- <http://forum.lazarus.freepascal.org/index.php/topic,22328.0.html> - install gdb
399+
400+Thread "\[Lazarus\] Help: macOS Problems" on
401+
402+- <http://lists.lazarus.freepascal.org/pipermail/lazarus/2013-November/thread.html#84126>
403+- <http://lists.lazarus.freepascal.org/pipermail/lazarus/2013-October/thread.html#84095>
404+
405+### Frozen UI with GDB
406+
407+To start a program from the shell you need to run "open \<program1\>.app", direct access to ./program1 will not give you access to the UI. To get gdb working from inside your IDE you have to specify this path as run parameter. Choose from menu Run \> Run parameter and enter the full path at host application. For instance, /User/\<yourid\>/sources/myproject/project1.app/Content/MacOS/project1
408+
409+### Links
410+
411+- macOS comes with a lot of useful tools for debugging and profiling. Just start /Developer/Applications/Instruments.app and try them out.
412+
413+## FreeBSD
414+
415+### FreeBSD 11
416+
417+The system-provided gdb is ancient (version 6.1.1 in FreeBSD 11.4) and does not work well with Lazarus.
418+
419+You can install a newer gdb from the ports tree, e.g.
420+
421+``` bash
422+cd /usr/ports/devel/gdb
423+make -DBATCH install clean
424+```
425+
426+The new gdb is located in "/usr/local/bin/gdb".
427+
428+### FreeBSD 12
429+
430+The system-provided gdb is ancient (version 6.1.1 in FreeBSD 12.3) and it does not work well with Lazarus.
431+
432+You can install a newer gdb from the ports tree, e.g.
433+
434+``` bash
435+cd /usr/ports/devel/gdb
436+make -DBATCH install clean
437+```
438+
439+The new gdb is located in "/usr/local/bin/gdb".
440+
441+It may need the following project option ("Project Options" dialog):
442+
443+- "Use external debug symbols file" is off
444+
445+### FreeBSD 13
446+
447+FreeBSD 13.0 has removed the ancient gdb from the base system and replaced it with [[lldb]].
448+
449+You can still install a recent gdb from the ports tree.
450+
451+## Using a translated GDB (non-English responses from GDB)
452+
453+- This applies only to Lazarus *before* 1.2 or *before* 1.0.14.\
454+ This is no longer needed.
455+
456+The IDE expects responses in English. If GDB is translated this may affect how well the IDE can use it.
457+
458+In many cases it will still work, but with limits, such as:
459+
460+- No Message or Class for exceptions
461+- No live update of threads, while app is running
462+- Debugger error reported, after the app is stopped (at end of debugging)
463+- other ...
464+
465+Please read the entire thread: [[http://forum.lazarus.freepascal.org/index.php/topic,20756.msg120720 http://forum.lazarus.freepascal.org/index.php/topic,20756.msg120720]]
466+
467+Try to run lazarus with
468+
469+` export LANG=en_US.UTF-8`\
470+` lazarus`
471+
472+## Known Problems / Errors reported by the IDE
473+
474+<table>
475+
476+<tr valign="top">
477+
478+<th style="text-align:left">
479+
480+Message    
481+
482+</th>
483+
484+<th style="text-align:left">
485+
486+OS
487+
488+</th>
489+
490+<th style="text-align:left">
491+
492+Description
493+
494+</th>
495+
496+<th style="text-align:left; min-width:40%">
497+
498+ 
499+
500+</th>
501+
502+</tr>
503+
504+<tr valign="top">
505+
506+<td colspan="3">
507+
508+### During startup program exited normally
509+
510+</td>
511+
512+<td>
513+
514+ 
515+
516+</td>
517+
518+</tr>
519+
520+<tr valign="top">
521+
522+<td>
523+
524+ 
525+
526+</td>
527+
528+<td>
529+
530+**All**
531+
532+</td>
533+
534+<td colspan="2">
535+
536+In rare cases the IDE displays the message "During startup program exited normally". This message appears when the debugged application is closed. If this happens no breakpoints in the app will have been triggered, and the app will have run as if no debugger was present.
537+
538+This error can happen for various reasons. There are at least 2 known:
539+
540+- certain position independent exe (PIE) : GDB fails to relocate certain breakpoints that Lazarus uses to start the exe (this is before any user breakpoints are set)
541+- certain dll/so libraries, that define the same symbols as the main exe.
542+
543+There may be more. The 2nd only happens on repeated runs of the debugger.
544+
545+The IDE tries to work around those, but it does not always succeed. It is likely that in cases where it currently fails, this must be worked around by user set config (see below).
546+
547+Even if you can work around, please consider to send a logfile: #Log_info_for_debug_session
548+
549+<b>Ways to work around: (all on the options / debugger page)</b>
550+
551+- In case 2 only: #gdb.exe_has_stopped_working
552+
553+Lazarus 1.2.2 and before
554+go to the debugger options and in the field "debugger_startup_options" enter:\
555+--eval-command="set auto-solib-add off"
556+
557+Lazarus 1.2.4 and higher
558+go to the debugger options and set the field "DisableLoadSymbolsForLibraries" to "True"
559+
560+This can only be used, if you do not debug within libraries (if you have not written your own lib)
561+
562+- In Case 2 only: Check "reset debugger after each run"
563+
564+It will add a very slight increase to the time it takes to start the debugger, as gdb must be reloaded each time.
565+
566+- In all cases:
567+
568+Try any of the values available for "InternalStartBreak" (in the property grid of the options)
569+
570+</td>
571+
572+</tr>
573+
574+<tr valign="top">
575+
576+<td colspan="3">
577+
578+### SIGFPE
579+
580+</td>
581+
582+<td>
583+
584+ 
585+
586+</td>
587+
588+</tr>
589+
590+<tr valign="top">
591+
592+<td>
593+
594+ 
595+
596+</td>
597+
598+<td>
599+
600+**All**
601+
602+</td>
603+
604+<td colspan="2">
605+
606+SIGFPE is a floating point unit exception.
607+
608+Source: [[http://forum.lazarus.freepascal.org/index.php/topic,21586.0.html forum thread]]
609+
610+SIGFPE exceptions are raised on the next FPU instruction; therefore the error line you get from Lazarus may be off/incorrect.
611+
612+Delphi, and thus Freepascal, have a non standard FPEMask. A lot of C libraries don't use exceptions to check FPU problems but inspect the FPU status.
613+
614+Workaround: try changing the mask with [SetExceptionMask](http://www.freepascal.org/docs-html/rtl/math/setexceptionmask.html) as early as possible in your program:
615+
616+``` pascal
617+uses math;
618+...
619+ SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide,
620+ exOverflow, exUnderflow, exPrecision])
621+```
622+
623+If you think there is something wrong in the FPC code, you can use the [\$SAFEFPUEXCEPTIONS](http://www.freepascal.org/docs-html/prog/progsu69.html) directive. This will add a FWAIT after every store of a FPU value to memory. Most FPC float and double operations end with storing the result somewhere in memory so the outcome is that the debugger stops on the correct FPC line. FWAIT is a nop for the FPU but will cause an exception to be raised immediately instead of somewhere down your code. It is not done per default because it slows down floating point operations a lot.
624+
625+</td>
626+
627+</tr>
628+
629+<tr valign="top">
630+
631+<td colspan="3">
632+
633+### Error 193 (Error creating process / Exe not found)
634+
635+</td>
636+
637+<td>
638+
639+ 
640+
641+</td>
642+
643+</tr>
644+
645+<tr valign="top">
646+
647+<td>
648+
649+ 
650+
651+</td>
652+
653+<td>
654+
655+**Windows**
656+
657+</td>
658+
659+<td colspan="2">
660+
661+For details see [here](http://bugs.freepascal.org/view.php?id=18238). This issue has been observed under Win XP and appears to be caused by Windows itself. The issue occurs if the path to your app has a space, and a 2nd path/file exists, with a name identical to the part of the path before the space, e.g.:
662+
663+
664+Your app: C:\test folder\project1.exe
665+
666+Some file: C:\test
667+
668+</td>
669+
670+</tr>
671+
672+<tr valign="top">
673+
674+<td colspan="3">
675+
676+### SigSegV - even with new, empty application
677+
678+</td>
679+
680+<td>
681+
682+ 
683+
684+</td>
685+
686+</tr>
687+
688+<tr valign="top">
689+
690+<td>
691+
692+ 
693+
694+</td>
695+
696+<td>
697+
698+**Windows**
699+
700+</td>
701+
702+<td colspan="2">
703+
704+Note
705+In <u>most</u> cases SigSegV is simply an error in your code.
706+
707+The following applies only, if you get a SigSegv, even with a new empty application (empty form, and no modifications made to unit1).
708+
709+A SigSegV sometimes can be caused by an incompatibility between GDB and some other products. It is not known if this is a GDB issue or caused by the other product. There is no indication that any of the products listed is in any way at fault. The information provided may only apply to some versions of the named products:
710+
711+Comodo firewall
712+<http://forum.lazarus.freepascal.org/index.php/topic,7065.msg60621.html#msg60621>
713+
714+BitDefender
715+enable game mode
716+
717+</td>
718+
719+</tr>
720+
721+<tr valign="top">
722+
723+<td colspan="3">
724+
725+### SigSegV - and continue debugging
726+
727+</td>
728+
729+<td>
730+
731+ 
732+
733+</td>
734+
735+</tr>
736+
737+<tr valign="top">
738+
739+<td>
740+
741+ 
742+
743+</td>
744+
745+<td>
746+
747+**Windows**, **Mac**
748+
749+</td>
750+
751+<td colspan="2">
752+
753+<http://sourceware.org/bugzilla/show_bug.cgi?id=10004>
754+
755+<http://forum.lazarus.freepascal.org/index.php/topic,18121.msg101798.html#msg101798>
756+
757+</td>
758+
759+</tr>
760+
761+<tr valign="top">
762+
763+<td colspan="3">
764+
765+### On Windows Open/Save/File or System Dialog cause gdb to crash
766+
767+See next entry "gdb.exe has stopped working"
768+
769+Or download the "alternative GDB" 7.7.1 (Win32) from the Lazarus SourceForge site.
770+
771+### "Step over" steps into function (Win 64)
772+
773+</td>
774+
775+<td>
776+
777+ 
778+
779+</td>
780+
781+</tr>
782+
783+<tr valign="top">
784+
785+<td>
786+
787+ 
788+
789+</td>
790+
791+<td>
792+
793+**Windows 64**
794+
795+</td>
796+
797+<td colspan="2">
798+
799+Sometimes pressing F8 does not step over a function, but steps into it.
800+
801+It is possible to continue with F8, and sometimes GDB will step back into the calling function, after 1 or 2 further steps (stepping over the remainder of the function).
802+
803+In Lazarus 2.0 a workaround was added, but needs to be enabled. Go to Tools \> Options \> Debugger and enable (in the property grid) "FixIncorrectStepOver".
804+
805+<tr valign="top">
806+
807+<td colspan="3">
808+
809+### gdb.exe has stopped working / SigSegv with Open/Close Dlg
810+
811+</td>
812+
813+<td>
814+
815+ 
816+
817+</td>
818+
819+</tr>
820+
821+<tr valign="top">
822+
823+<td>
824+
825+ 
826+
827+</td>
828+
829+<td>
830+
831+**Windows**
832+
833+</td>
834+
835+<td colspan="2">
836+
837+GDB itself has crashed. This will be due to a bug in gdb, and may not be fixable in Lazarus. Still it may be worth submitting info (see section "Reporting Bugs" below). Maybe Lazarus can avoid calling the failing function.
838+
839+There is one already known situation. GDB (6.6 to 7.4 (latest at the time of testing)) may crash while your app is being started, or right after your app stopped. This happen while the libraries (DLL) for your app are loaded (watch the "[[IDE Window: Debug Output|Debug output]]" window).
840+
841+Lazarus 1.2.2 and before
842+go to the debugger options and in the field "debugger_startup_options" enter:\
843+--eval-command="set auto-solib-add off"
844+
845+Lazarus 1.2.4 and higher
846+go to the debugger options and set the field "DisableLoadSymbolsForLibraries" to "True"
847+
848+This can only be used, if you do not debug within libraries (if you have not written your own lib) ![](/wiki-images/a/a9/Gdb_start_opt_nolib.png)
849+
850+</td>
851+
852+</tr>
853+
854+<tr valign="top">
855+
856+<td colspan="3">
857+
858+### internal-error: clear_dangling_display_expressions
859+
860+</td>
861+
862+<td>
863+
864+ 
865+
866+</td>
867+
868+</tr>
869+
870+<tr valign="top">
871+
872+<td>
873+
874+ 
875+
876+</td>
877+
878+<td>
879+
880+**Windows, maybe other**
881+
882+</td>
883+
884+<td colspan="2">
885+
886+At the end of the debug session, the debugger reports:
887+
888+`internal-error: clear_dangling_display_expressions: `\
889+`` Assertion `objfile->pspace == solib->pspace' failed. ``
890+
891+This is an error in gdb, and sometimes solved by
892+
893+Lazarus 1.2.2 and before
894+go to the debugger options and in the field "debugger_startup_options" enter:\
895+--eval-command="set auto-solib-add off"
896+
897+Lazarus 1.2.4 and higher
898+go to the debugger options and set the field "DisableLoadSymbolsForLibraries" to "True"
899+
900+This can only be used, if you do not debug within libraries (if you have not written your own lib)
901+
902+</td>
903+
904+</tr>
905+
906+<tr valign="top">
907+
908+<td colspan="3">
909+
910+### "PC register is not available" ("SuspendThread failed. (winerr 5)")
911+
912+</td>
913+
914+<td>
915+
916+ 
917+
918+</td>
919+
920+</tr>
921+
922+<tr valign="top">
923+
924+<td>
925+
926+ 
927+
928+</td>
929+
930+<td>
931+
932+**Windows**
933+
934+</td>
935+
936+<td colspan="2">
937+
938+GDB may fail with this message. This is due to [<http://sourceware.org/bugzilla/show_bug.cgi?id=14018>](http://sourceware.org/bugzilla/show_bug.cgi?id=14018) If you get this issue you may want to downgrade to GDB 7.2
939+
940+</td>
941+
942+</tr>
943+
944+<tr valign="top">
945+
946+<td colspan="3">
947+
948+### Cannot insert breakpoint
949+
950+</td>
951+
952+<td>
953+
954+ 
955+
956+</td>
957+
958+</tr>
959+
960+<tr valign="top">
961+
962+<td>
963+
964+ 
965+
966+</td>
967+
968+<td>
969+
970+**All**
971+
972+</td>
973+
974+<td colspan="2">
975+
976+<b>For breakpoints with negative numbers</b> Please see: <http://forum.lazarus.freepascal.org/index.php/topic,10317.msg121818.html#msg121818>
977+
978+You may also want to try:
979+
980+Lazarus 1.2.2 and before
981+go to the debugger options and in the field "debugger_startup_options" enter:\
982+--eval-command="set auto-solib-add off"
983+
984+Lazarus 1.2.4 and higher
985+go to the debugger options and set the field "DisableLoadSymbolsForLibraries" to "True"
986+
987+This can only be used, if you do not debug within libraries (if you have not written your own lib)
988+
989+<b>For breakpoints with positive numbers</b> This may happen due to incorrect [[Debugger Setup]]. Ensure smart linking is disabled. It usually means that the breakpoint is in a procedure that is not called, and not included in your exe.
990+
991+On Windows, if it happens despite correct setup, then add -Xe (external linker) to the custom options.
992+
993+</td>
994+
995+</tr>
996+
997+</table>
998+
999+## Reporting Bugs
1000+
1001+- Did you verify your [[Debugger Setup]]?
1002+- Did you try Dwarf and Stabs
1003+
1004+### Check existing Reports
1005+
1006+Please check each of the following links
1007+
1008+- [Search Mantis for category "debugger"](http://bugs.freepascal.org/search.php?project_id=0&category=Debugger&status_id%5B%5D=10&status_id%5B%5D=20&status_id%5B%5D=30&status_id%5B%5D=40&status_id%5B%5D=50&status_id%5B%5D=80&sticky_issues=on&sortby=last_updated&dir=DESC&per_page=250&hide_status_id=-2)
1009+- [Search Mantis for text "debugger"](http://bugs.freepascal.org/search.php?project_id=1&search=debugger&category%5B%5D=-&category%5B%5D=Compiler&category%5B%5D=Converter&category%5B%5D=Custom+Drawn&category%5B%5D=Database&category%5B%5D=Database+Components&category%5B%5D=Documentation&category%5B%5D=FCL&category%5B%5D=FPSpreadsheet&category%5B%5D=FV&category%5B%5D=Free+Vision&category%5B%5D=IDE&category%5B%5D=Installer&category%5B%5D=LCL&category%5B%5D=LazDataDesktop&category%5B%5D=LazReport&category%5B%5D=Misc&category%5B%5D=OnGuard&category%5B%5D=Other&category%5B%5D=Packages&category%5B%5D=Patch&category%5B%5D=Printer&category%5B%5D=RTL&category%5B%5D=TAChart&category%5B%5D=Utilities&category%5B%5D=Virtual+Treeview&category%5B%5D=Web+site&category%5B%5D=Website&category%5B%5D=Widgetset&category%5B%5D=glscene&category%5B%5D=lNet&category%5B%5D=rx&status_id%5B%5D=10&status_id%5B%5D=20&status_id%5B%5D=30&status_id%5B%5D=40&status_id%5B%5D=50&status_id%5B%5D=80&sticky_issues=on&sortby=last_updated&dir=DESC&per_page=250&hide_status_id=-2)
1010+- [Search Mantis for text "gdb"](http://bugs.freepascal.org/search.php?project_id=1&search=gdb&category%5B%5D=-&category%5B%5D=Compiler&category%5B%5D=Converter&category%5B%5D=Custom+Drawn&category%5B%5D=Database&category%5B%5D=Database+Components&category%5B%5D=Documentation&category%5B%5D=FCL&category%5B%5D=FPSpreadsheet&category%5B%5D=FV&category%5B%5D=Free+Vision&category%5B%5D=IDE&category%5B%5D=Installer&category%5B%5D=LCL&category%5B%5D=LazDataDesktop&category%5B%5D=LazReport&category%5B%5D=Misc&category%5B%5D=OnGuard&category%5B%5D=Other&category%5B%5D=Packages&category%5B%5D=Patch&category%5B%5D=Printer&category%5B%5D=RTL&category%5B%5D=TAChart&category%5B%5D=Utilities&category%5B%5D=Virtual+Treeview&category%5B%5D=Web+site&category%5B%5D=Website&category%5B%5D=Widgetset&category%5B%5D=glscene&category%5B%5D=lNet&category%5B%5D=rx&status_id%5B%5D=10&status_id%5B%5D=20&status_id%5B%5D=30&status_id%5B%5D=40&status_id%5B%5D=50&status_id%5B%5D=80&sticky_issues=on&sortby=last_updated&dir=DESC&per_page=250&hide_status_id=-2)
1011+- [Search Mantis for text "dwarf"](http://bugs.freepascal.org/search.php?project_id=0&search=dwarf&category%5B%5D=-&category%5B%5D=Compiler&category%5B%5D=Converter&category%5B%5D=Custom+Drawn&category%5B%5D=Database&category%5B%5D=Database+Components&category%5B%5D=Documentation&category%5B%5D=FCL&category%5B%5D=FPSpreadsheet&category%5B%5D=FV&category%5B%5D=Free+Vision&category%5B%5D=IDE&category%5B%5D=Installer&category%5B%5D=LCL&category%5B%5D=LazDataDesktop&category%5B%5D=LazReport&category%5B%5D=Misc&category%5B%5D=OnGuard&category%5B%5D=Other&category%5B%5D=Packages&category%5B%5D=Patch&category%5B%5D=Printer&category%5B%5D=RTL&category%5B%5D=TAChart&category%5B%5D=Utilities&category%5B%5D=Virtual+Treeview&category%5B%5D=Web+site&category%5B%5D=Website&category%5B%5D=Widgetset&category%5B%5D=glscene&category%5B%5D=lNet&category%5B%5D=rx&status_id%5B%5D=10&status_id%5B%5D=20&status_id%5B%5D=30&status_id%5B%5D=40&status_id%5B%5D=50&status_id%5B%5D=80&sticky_issues=on&sortby=last_updated&dir=DESC&per_page=250&hide_status_id=-2)
1012+- [Search Mantis for text "stabs"](http://bugs.freepascal.org/search.php?project_id=0&search=stabs&category%5B%5D=-&category%5B%5D=Compiler&category%5B%5D=Converter&category%5B%5D=Custom+Drawn&category%5B%5D=Database&category%5B%5D=Database+Components&category%5B%5D=Documentation&category%5B%5D=FCL&category%5B%5D=FPSpreadsheet&category%5B%5D=FV&category%5B%5D=Free+Vision&category%5B%5D=IDE&category%5B%5D=Installer&category%5B%5D=LCL&category%5B%5D=LazDataDesktop&category%5B%5D=LazReport&category%5B%5D=Misc&category%5B%5D=OnGuard&category%5B%5D=Other&category%5B%5D=Packages&category%5B%5D=Patch&category%5B%5D=Printer&category%5B%5D=RTL&category%5B%5D=TAChart&category%5B%5D=Utilities&category%5B%5D=Virtual+Treeview&category%5B%5D=Web+site&category%5B%5D=Website&category%5B%5D=Widgetset&category%5B%5D=glscene&category%5B%5D=lNet&category%5B%5D=rx&status_id%5B%5D=10&status_id%5B%5D=20&status_id%5B%5D=30&status_id%5B%5D=40&status_id%5B%5D=50&status_id%5B%5D=80&sticky_issues=on&sortby=last_updated&dir=DESC&per_page=250&hide_status_id=-2)
1013+
1014+### Bugs in GDB
1015+
1016+<table class="wikitable">
1017+
1018+<tr valign="top">
1019+
1020+<th>
1021+
1022+Description
1023+
1024+</th>
1025+
1026+<th>
1027+
1028+OS
1029+
1030+</th>
1031+
1032+<th>
1033+
1034+GDB Version(s)
1035+
1036+</th>
1037+
1038+<th>
1039+
1040+Reference
1041+
1042+</th>
1043+
1044+</tr>
1045+
1046+<tr valign="top">
1047+
1048+<td>
1049+
1050+win64 crash with bad dwarf2 symbols
1051+
1052+</td>
1053+
1054+<td>
1055+
1056+win64
1057+
1058+</td>
1059+
1060+<td>
1061+
1062+GDB 7.4 (maybe higher)
1063+
1064+</td>
1065+
1066+<td>
1067+
1068+<http://sourceware.org/bugzilla/show_bug.cgi?id=14014>
1069+
1070+</td>
1071+
1072+</tr>
1073+
1074+<tr valign="top">
1075+
1076+<td>
1077+
1078+Debuggee doesn't see environment variables set with set environment
1079+
1080+</td>
1081+
1082+<td>
1083+
1084+win
1085+
1086+</td>
1087+
1088+<td>
1089+
1090+Solved in GDB 7.4
1091+
1092+</td>
1093+
1094+<td>
1095+
1096+<http://sourceware.org/bugzilla/show_bug.cgi?id=10989>
1097+
1098+</td>
1099+
1100+</tr>
1101+
1102+<tr valign="top">
1103+
1104+<td>
1105+
1106+Win32 fails to continue with "winerr 5" (pc register not available)\
1107+*apparently* not present in 7.0 to 7.2
1108+
1109+</td>
1110+
1111+<td>
1112+
1113+win
1114+
1115+</td>
1116+
1117+<td>
1118+
1119+GDB 7.3 and up (maybe 6.x too)\
1120+Appears to be fixed in 7.7.1
1121+
1122+</td>
1123+
1124+<td>
1125+
1126+<http://sourceware.org/bugzilla/show_bug.cgi?id=14018>
1127+
1128+</td>
1129+
1130+</tr>
1131+
1132+<tr valign="top">
1133+
1134+<td>
1135+
1136+Wrong array index with dwarf
1137+
1138+</td>
1139+
1140+<td>
1141+
1142+*
1143+
1144+</td>
1145+
1146+<td>
1147+
1148+GDB 7.3 to 7.5 (maybe 7.6.0)\
1149+fixed in 7.6.1
1150+
1151+</td>
1152+
1153+<td>
1154+
1155+<http://sourceware.org/bugzilla/show_bug.cgi?id=15102>
1156+
1157+</td>
1158+
1159+</tr>
1160+
1161+<tr valign="top">
1162+
1163+<td>
1164+
1165+GDB crashes, if trying to inspect or watch resourcestrings\
1166+only tested on win32, not known for other platforms only, if using dwarf
1167+
1168+</td>
1169+
1170+<td>
1171+
1172+*
1173+
1174+</td>
1175+
1176+<td>
1177+
1178+GDB 7.0 to 7.2.xx
1179+
1180+</td>
1181+
1182+<td>
1183+
1184+</td>
1185+
1186+</tr>
1187+
1188+<tr valign="top">
1189+
1190+<td>
1191+
1192+Records (especially: pointer to record) may be mistaken for classes/objects\
1193+The data/values appear to be displayed correct / further tests pending\
1194+This also affect the ability to inspect shortstring\
1195+You can workaround this by manually typecasting.
1196+
1197+</td>
1198+
1199+<td>
1200+
1201+*
1202+
1203+</td>
1204+
1205+<td>
1206+
1207+GDB 7.6.1 and up (tested and failing up to GDB 8.1)
1208+
1209+</td>
1210+
1211+<td>
1212+
1213+<https://sourceware.org/bugzilla/show_bug.cgi?id=16016>
1214+
1215+</td>
1216+
1217+</tr>
1218+
1219+<tr valign="top">
1220+
1221+<td>
1222+
1223+Object variables (Members) of the current methods class (self.xxx) cannot be watched/inspected\
1224+To work around use upper case or prefix with self.
1225+
1226+</td>
1227+
1228+<td>
1229+
1230+*
1231+
1232+</td>
1233+
1234+<td>
1235+
1236+GDB 7.7 up to 7.9.0 (incl)\
1237+Workaround present in Lazarus 1.4 and up
1238+
1239+</td>
1240+
1241+<td>
1242+
1243+<https://sourceware.org/bugzilla/show_bug.cgi?id=17835>
1244+
1245+</td>
1246+
1247+</tr>
1248+
1249+<tr valign="top">
1250+
1251+<td>
1252+
1253+gdb cannot continue after SIGFPE or SIGSEGV happen on windows
1254+
1255+</td>
1256+
1257+<td>
1258+
1259+win
1260+
1261+</td>
1262+
1263+<td>
1264+
1265+*
1266+
1267+</td>
1268+
1269+<td>
1270+
1271+<https://sourceware.org/bugzilla/show_bug.cgi?id=10004>
1272+
1273+</td>
1274+
1275+</tr>
1276+
1277+<tr valign="top">
1278+
1279+<td>
1280+
1281+GDB truncates values for "const x = qword(...)"
1282+
1283+</td>
1284+
1285+<td>
1286+
1287+Win 64 bit\
1288+maybe others
1289+
1290+</td>
1291+
1292+<td>
1293+
1294+Fixed in GDB 7.7 and up, maybe fibed between 7.3 and 7.7
1295+
1296+</td>
1297+
1298+<td>
1299+
1300+</td>
1301+
1302+</tr>
1303+
1304+<tr valign="top">
1305+
1306+<td>
1307+
1308+GDB error for inspecting interfaces (IUnknown etc)
1309+
1310+</td>
1311+
1312+<td>
1313+
1314+</td>
1315+
1316+<td>
1317+
1318+DWARF 3
1319+
1320+</td>
1321+
1322+<td>
1323+
1324+<https://sourceware.org/bugzilla/show_bug.cgi?id=25101>
1325+
1326+</td>
1327+
1328+</tr>
1329+
1330+<tr valign="top">
1331+
1332+<td>
1333+
1334+GDB can not display structures (e.g. class) with dyn array inside
1335+
1336+</td>
1337+
1338+<td>
1339+
1340+</td>
1341+
1342+<td>
1343+
1344+DWARF 3
1345+
1346+</td>
1347+
1348+<td>
1349+
1350+<https://sourceware.org/bugzilla/show_bug.cgi?id=25102>
1351+
1352+</td>
1353+
1354+</tr>
1355+
1356+<tr valign="top">
1357+
1358+<td>
1359+
1360+GDB crash on ^AnsiString
1361+
1362+</td>
1363+
1364+<td>
1365+
1366+</td>
1367+
1368+<td>
1369+
1370+DWARF 3
1371+
1372+</td>
1373+
1374+<td>
1375+
1376+<https://sourceware.org/bugzilla/show_bug.cgi?id=25103>
1377+
1378+</td>
1379+
1380+</tr>
1381+
1382+</table>
1383+
1384+### Issues with GDB 7.5.9 or 7.6
1385+
1386+There are various reports (not confirmed) for different platforms about crashes in gdb 7.5.9 or 7.6.
1387+
1388+It is highly recommended not to use those versions.
1389+
1390+- <http://bugs.freepascal.org/view.php?id=24401>
1391+- <http://forum.lazarus.freepascal.org/index.php/topic,20756.msg120842.html#msg120842>
1392+- <http://sourceware.org/bugzilla/show_bug.cgi?id=15453>
1393+
1394+### Create a new Report (GDB and LLDB)
1395+
1396+If you have at any time in the past updated, changed, reinstalled your Lazarus then please check the "Options" dialog ("Environment" or "Tools" Menu) for the version of GDB and FPC used. They may still point to old settings.
1397+
1398+#### Basic Information
1399+
1400+- Your Operating system and Version
1401+- Your CPU (Intel, Power, ...) <b>32 or 64 bit</b>
1402+- Version of
1403+ - Lazarus (Latest Release or SVN revision) (Include setting used to recompile LCL, packages or IDE (if a custom compile Lazarus is used))
1404+ - FPC, if different from default. Please check the "Options" dialog ("Environment" or "Tools" Menu)
1405+ - GDB, please check the "Options" dialog ("Environment" or "Tools" Menu)
1406+- Compiler Settings: (Menu: "Project", "Project Options", indicate all settings you used )
1407+ - Page "Code generation"
1408+
1409+
1410+
1411+Optimization settings (-O???): Level (-O1 / ...) Other (-OR -Ou -Os) (Please always test with all optimizations disabled, and -O1)
1412+
1413+#### Log info for debug session
1414+
1415+
1416+Start Lazarus with the following options:
1417+
1418+` --debug-log=LOG_FILE  --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO,DBG_ERRORS`
1419+
1420+:;On Windows: you need to create a shortcut to the Lazarus exe (like the one on Desktop) and edit it's properties. Add " --debug-log=C:\laz.log --debug-enable=..." to the command line.
1421+
1422+:;On Linux: start Lazarus from a shell and append " --debug-log=/home/yourname/laz.log --debug-enable=..." to the command line
1423+
1424+:;On Mac/OSX:start Lazarus from a shell /path/to/lazarus/lazarus.app/Contents/MacOS/lazarus --debug-log=/path/to/yourfiles/laz.log --debug-enable=...
1425+
1426+Attach the log file after reproducing the error.
1427+
1428+If you cannot generate a log file, you may try to open the "Debug output" window (from menu "View" -\> "Ide Internals").<b>You must open this before you run your app (F9)</b>. And then run your app. Once the error occurs, copy, zip, and attach the content of the "debug output" window.
1429+
1430+## Running the test-case
1431+
1432+If you run a different version of GDB you may want to run the test case. Please note, that not all tests have yet the correct expectations for each possible setup. Therefore some tests may fail on some systems.
1433+
1434+The debugger test are in the directory:
1435+
1436+- Lazarus 1.2.x: debugger\test\Gdbmi\\
1437+- Lazarus 1.3 and up: components\lazdebuggergdbmi\test\\
1438+
1439+In the below the 1.3 path is used. If using 1.2.x substitute as appropriate.
1440+
1441+One time setup
1442+
1443+Create directory components\lazdebuggergdbmi\test\Logs: Optional, but helps keeping test result in one place
1444+
1445+Create config files: in components\lazdebuggergdbmi\test\\
1446+
1447+
1448+copy fpclist.txt.sample to fpclist.txt
1449+
1450+copy gdblist.txt.sample to gdblist.txt
1451+
1452+open the 2 txt files and edit the path to fpc/gdb, also edit the version (the test may run different test, for different versions). It is possible to specify more than one gdb/fpc
1453+
1454+Running the test
1455+
1456+- Open project: components\lazdebuggergdbmi\test\TestGdbmi.lpi
1457+- Lazarus 1.2.x only: Rebuild the IDE with option "Clean" (Menu Tools: "Configure build IDE" / Restart is not needed). If this is skipped, compilation of the project may fail. Once compilation failed, ALL *.ppu/*.o files in debugger\test must be deleted by hand.
1458+- Run the project (If a test failed, you may have to delete *.exe files in components\lazdebuggergdbmi\test\TestApps
1459+
1460+See also [[Lazarus Debugger Implementation|Lazarus Debugger Implementation#Testcases (Backend)]]
1461+
1462+## Links
1463+
1464+### External Links
1465+
1466+- [Official GDB site](https://www.gnu.org/software/gdb/)
1467+
1468+### Experimental Debuggers in Pascal
1469+
1470+Those are work in progress:
1471+
1472+- <http://sourceforge.net/projects/duby/>
1473+- <https://github.com/graemeg/fpdebug>
1474+- [[FpDebug]] in Lazarus/components/fpdebug and debugger/components/fpgdbmidebugger [blog](http://lazarus-dev.blogspot.co.uk/2014/05/de-bug-wars-new-hope.html) [[FpGdbmiDebugger]], LazDebuggerFpLldb and LazDebuggerFP
1475+
1476+- <http://forum.lazarus.freepascal.org/index.php/topic,22252.0.html>
1477+
1478+### Related forum topics
1479+
1480+- [Issues (crash) with gdb 7.6.2 on arch linux](http://forum.lazarus.freepascal.org/index.php/topic,23221.0.html)
1481+- [About the LLDB based debugger](https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html)
1482+
1483+---
1484+*From the Free Pascal wiki, page "GDB Debugger Tips", as it stood on 2022-05-28 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
1485+Category: Debugging

Back to history