View Issue Details

IDProjectCategoryView StatusLast Update
0037798LazarusDebuggerpublic2020-09-23 20:35
ReporterKlaus1 Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2.0.10 
Summary0037798: GDB debugger not forecast the ymm register content.
DescriptionI have tested a little console program with the gdb debugger from Lazarus. The debugger not known ymm register or not forecast. But since gdm 7.6 the gdb known ymm register for the amd-64 systems. Is the ymm ability fergotten to implement in make the gdb.exe ?
Regards
Klaus
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetWin32/Win64
Attached Files

Activities

Martin Friebe

2020-09-22 19:44

manager   ~0125759

Lazarus currently ships with gdb 7.3 for 64 bit.
So only registers shown by 7.3 will be displayed.

You can download a newer gdb from our Sourceforge site https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/
(There is a similar section for win 32).

Currently the version shipped with release will not be updated.
All of the newer versions do not work with unicode/utf8 for environment vars. Thus they will break debugging on any system that uses none latin charsets.
(This is likely a build issue / how gdb is build / but it is currently unresolved)

Klaus1

2020-09-23 13:04

reporter   ~0125772

Hello Martin,
the GDB is Version 8.2 within Lazarus_win64, and this version normal see ymm registers.
Here the copy from the last Lazarus Win64.

D:\Lazarus_210\mingw\x86_64-win64\bin>gdb
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w32-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) show configuration
This GDB was configured as follows:
   configure --host=x86_64-w32-mingw32 --target=x86_64-w32-mingw32
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/usr/local/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/local/lib/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --without-babeltrace
             --without-intel-pt
             --disable-libmcheck
             --without-mpfr
             --without-guile
             --with-separate-debug-dir=/usr/local/lib/debug (relocatable)

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)
(gdb)

Martin Friebe

2020-09-23 14:13

manager   ~0125774

Indeed, some 2.0.x releases came with gdb 8.2. That was before the other issue was known. The next release will be back on gdb 7.3.

The output from gdb 8.2 on a i7 8600k (should have avx and avx2)
<-data-list-register-names>
^done,register-names=["rax","rbx","rcx","rdx","rsi","rdi","rbp","rsp","r8","r9","r10","r11","r12","r13","r14","r15","rip","eflags","cs","ss","ds","es","fs","gs","st0","st1","st2","st3","st4","st5","st6","st7","fctrl","fstat","ftag","fiseg","fioff","foseg","fooff","fop","xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7","xmm8","xmm9","xmm10","xmm11","xmm12","xmm13","xmm14","xmm15","mxcsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","al","bl","cl","dl","sil","dil","bpl","spl","r8l","r9l","r10l","r11l","r12l","r13l","r14l","r15l","ah","bh","ch","dh","ax","bx","cx","dx","si","di","bp","","r8w","r9w","r10w","r11w","r12w","r13w","r14w","r15w","eax","ebx","ecx","edx","esi","edi","ebp","esp","r8d","r9d","r10d","r11d","r12d","r13d","r14d","r15d"]


Even "info all-registers" and "maint print raw-registers" did not print them.

Nor did "p $ymm0" (while "p $xmm0" does print the xmm0)


I found the changelog for gdb 7.4 that says they can be printed. But nothing on how to make gdb print them.

Klaus1

2020-09-23 20:05

reporter   ~0125785

Klaus1

2020-09-23 20:15

reporter   ~0125786

Last edited: 2020-09-23 20:22

View 2 revisions

Thanks Martin,
I have a IviBridge processor and I have developed with the VEX unit. From sandyBridge(intel) and Bulldozer(AMD) this processors have a VEX -unit.
The processors are 9 years old and I think is time for develop and use this feature...
Ok, I understand the problems with UTF8 coding, but for Registers this is not relevant. Maybe use both GDB's for "normal" debug the old and for "spezialised" debug the new.
I think in the configuration is the key for the display or in MINGW tools?
Regards Klaus

Martin Friebe

2020-09-23 20:35

manager   ~0125787

The gdb version is the lesser issue. Since one can always replace it locally.

The question is why gdb does not show the ymm registers. (The name appears in the gdb source, but no clue how to trigger it).
If gdb shows them, the IDE will too.
It could even be something on how gdb is/was build. But I would have no clue what...

Menu: View > Ide Internals > Debug output => you can see what gdb does.

Compile your IDE with -dDBG_WITH_DEBUGGER_DEBUG and above window also allows to send commands to gdb (while paused / and only none-step/run commands).

Issue History

Date Modified Username Field Change
2020-09-22 18:23 Klaus1 New Issue
2020-09-22 18:23 Klaus1 Status new => assigned
2020-09-22 18:23 Klaus1 Assigned To => Martin Friebe
2020-09-22 19:44 Martin Friebe Note Added: 0125759
2020-09-23 13:04 Klaus1 Note Added: 0125772
2020-09-23 14:13 Martin Friebe Note Added: 0125774
2020-09-23 20:05 Klaus1 Note Added: 0125785
2020-09-23 20:15 Klaus1 Note Added: 0125786
2020-09-23 20:22 Klaus1 Note Edited: 0125786 View Revisions
2020-09-23 20:35 Martin Friebe Note Added: 0125787