Package: gdb Version: 10.1-1.7 Severity: normal >From a coomplicated gdb session (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003638):
(gdb) p (float*)$2 $29 = (float *) 0x556e612bd530 (gdb) watch *(float*)$29 Hardware watchpoint 10: *(float*)$29 (gdb) d 10 [...] (gdb) watch *(float*)$30 Watchpoint 21: *(float*)$30 (gdb) d 21 (gdb) p $30 $31 = (float *) 0x556e614692d0 (gdb) p $30==(float*)0x556e614692d0 $32 = 1 (gdb) watch *(float*)0x556e614692d0 Hardware watchpoint 22: *(float*)0x556e614692d0 (gdb) d 22 So watching a float at some address (*$2) creates a hardware watchpoint, but at another one (*$30) only a software watchpoint (which in this case was unusably slow). But watching the same address typed explicitly (and verified with "==" to rule out copy/paste error) gave a hardware watchpoint again (which did help to find the other bug :). Nothing in the docs or on the net I could find gives any explanation when and why gdb uses hardware watchpoints (only an option to force software watchpoints which is the opposite I want). I don't see any reason here, so I suppose it's a bug. If not, it would be useful to at least tell the user why it doesn't. -- System Information: Debian Release: 11.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-9-amd64 (SMP w/24 CPU threads) Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages gdb depends on: ii libbabeltrace1 1.5.8-1+b3 ii libc6 2.31-13+deb11u2 ii libdebuginfod1 0.183-1 ii libexpat1 2.2.10-2 ii libgcc-s1 10.2.1-6 ii libipt2 2.0.3-1 ii liblzma5 5.2.5-2 ii libmpfr6 4.1.0-3 ii libncursesw6 6.2+20201114-2 ii libpython3.9 3.9.2-1 ii libreadline8 8.1-1 ii libsource-highlight4v5 3.1.9-3+b1 ii libstdc++6 10.2.1-6 ii libtinfo6 6.2+20201114-2 ii libxxhash0 0.8.0-2 ii zlib1g 1:1.2.11.dfsg-2 Versions of packages gdb recommends: ii libc6-dbg [libc-dbg] 2.31-13+deb11u2 Versions of packages gdb suggests: pn gdb-doc <none> pn gdbserver <none> -- no debconf information