Your message dated Sun, 03 Aug 2025 17:06:04 -0400
with message-id <[email protected]>
and subject line Closing bug
has caused the Debian Bug report #500804,
regarding gdb: broken conditional break point
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
500804: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500804
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 6.8-3
Severity: normal
NOTE: I encountered what is possibly a second bug while assembling
this bug report. If the scripts are run as presented below, gdb
segfaults. It fails as describled below if the gdb commands are
entered manually.
This does not work as expected (stops at i==0 rather than i == 4):
#!/bin/sh
cat <<EOF1 >bug.cc
#include <vector>
int main()
{
int array[] = { 1, 1, 1, 1, 2 };
std::vector<int> vect( 5, 1 );
int i, j;
for (i = 0; i < 5; ++i)
j = array[i] + vect[i];
return j;
}
EOF1
g++ -g bug.cc -o bug
gdb bug <<CMDS1
b 9
condition 1 array[i] != vect[i]
r
p i
CMDS1
# END SCRIPT
Further, if I insert a single blank line, GDB crashes rather than
failing to correctly evaluate the condition:
#!/bin/sh
cat <<EOF2 >bug.cc
#include <vector>
int main()
{
int array[] = { 1, 1, 1, 1, 2 };
std::vector<int> vect( 5, 1 );
int i, j;
for (i = 0; i < 5; ++i)
j = array[i] + vect[i];
return j;
}
EOF2
g++ -g bug.cc -o bug
gdb bug <<CMDS2
b 10
condition 1 array[i] != vect[i]
r
p i
CMDS2
# END SCRIPT
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-perfctr35.0 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gdb depends on:
ii libc6 2.7-13 GNU C Library: Shared libraries
ii libexpat1 2.0.1-4 XML parsing C library - runtime li
ii libncurses5 5.6+20080830-1 shared libraries for terminal hand
ii libreadline5 5.2-3 GNU readline and history libraries
gdb recommends no packages.
Versions of packages gdb suggests:
pn gdb-doc <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
I can't reproduce this bug with GDB 16.1:
--8<---------------cut here---------------start------------->8---
Breakpoint 1, main () at bug.cc:9
9 j = array[i] + vect[i];
(gdb) $1 = 4
--8<---------------cut here---------------end--------------->8---
I'm closing it. Feel free to reopen if it's still applicable.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/
signature.asc
Description: PGP signature
--- End Message ---