[Bug mi/34501] gdb responds with corrupt output on trying to inserting a breakpoint

"jarmo.tiitto at gmail dot com via Gdb-prs" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34501

--- Comment #5 from Jarmo Tiitto <jarmo.tiitto at gmail dot com> ---
* The configure flags used to build gdb (what steps you used to build it,
including compiler flags if you set any explicitly or in the environment)

I built GDB using Arch Linux's makepkg. I disabled the LTO in the PKGBUILD, to
speed up the build. Aprox steps reproduce the build:

extract https://ftp.gnu.org/gnu/gdb/gdb-17.2.tar.xz to ./gdb
cd ./gdb
export TMPDIR=/var/tmp/jarmo (I did not have enough space in /tmp to build GDB)
mkdir -p build && cd build

printenv outputs following environment variables 

SHELL=/bin/zsh
DEBUG_FFLAGS=-g -ffile-prefix-map=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
VSSCRIPT_PATH=/usr/lib/python3.14/site-packages/vapoursynth/libvsscript.so
PYTHONHASHSEED=0
TEXTDOMAINDIR=/usr/share/locale
GIT_CONFIG_GLOBAL=/dev/null
GPG_TTY=/dev/pts/1
FFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt        
-Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection        
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
-ffile-prefix-map=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
EDITOR=nano
PWD=/mnt/source/gdb/gdb/src/gdb-17.2/build
SOURCE_DATE_EPOCH=1786387891
LOGNAME=jarmo
CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions        
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security        
-fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g
-ffile-prefix-map=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
DEBUG_RUSTFLAGS=-C debuginfo=2
--remap-path-prefix=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
MOTD_SHOWN=pam
COMMAND_MODE=legacy
LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now      
   -Wl,-z,pack-relative-relocs
HOME=/home/jarmo
LANG=en_US.UTF-8
WAYLAND_DISPLAY=/opt/host/wayland-0
GIT_CONFIG_SYSTEM=/etc/makepkg.d/gitconfig
RUSTFLAGS=-C force-frame-pointers=yes -C debuginfo=2
--remap-path-prefix=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
TMPDIR=/var/tmp/jarmo
FCFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt        
-Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection        
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
-ffile-prefix-map=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
MAKEFLAGS=-j16
TERM=xterm-256color
USER=jarmo
SHLVL=2
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
XDG_DATA_DIRS=/home/jarmo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
CHOST=x86_64-pc-linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/jarmo/bin
CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions        
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security        
-fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -g
-ffile-prefix-map=/mnt/source/gdb/gdb/src=/usr/src/debug/gdb
MAIL=/var/spool/mail/jarmo
OLDPWD=/mnt/source/gdb/gdb/src/gdb-17.2
TEXTDOMAIN=pacman-scripts
_=/usr/bin/printenv

Right before running configure and building:

../configure \
--prefix=/usr \
--disable-nls \
--enable-source-highlight \
--enable-tui \
--enable-targets=all \
--enable-languages=all \
--enable-multilib \
--enable-interwork \
--with-system-readline \
--with-python=/usr/bin/python \
--with-system-gdbinit=/etc/gdb/gdbinit
make -j16

* Full steps needed to start gdb and commands run

See the attached tarball, gdb.sh reproduces the bug. I confirmed using the self
built GDB and Arch Linux's official version.
The output is different on purpose from 1st attachment because the
"17-environment-cd" command fails, but this way I don't need to attach any
debugee binaries or source files.

* Minimal set of source files needed for the full steps

No source files are needed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.