NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/38185



The following reply was made to PR toolchain/38185; it has been noted by GNATS.

From: "William D. Jones" <thor0505%comcast.net@localhost>
To: <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: toolchain/38185
Date: Sat, 4 Apr 2015 22:41:00 -0400

 On my Raspberry Pi Model A, even the version of GDB that Patrick Welche is 
 using has this bug. I am not able to test Christos' exact code/setup. 
 However, here is an example program (ignore the "Reset CPU" messages- I'm 
 playing with a CPU over RPI GPIO), compiled without optimization (and of 
 course containing the -g option), showing the problem exists on my machine:
 
 rpi-ptrain# gdb -v
 GNU gdb (GDB) 7.7.1
 Copyright (C) 2014 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 "arm--netbsdelf-eabihf".
 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".
 
 rpi-ptrain# gdb -q buf65test
 Reading symbols from buf65test...done.
 (gdb) l 78
 73         if(write_ctrl_line(gpiofd, PHI2, 1) == -1) /* PHI2 high, so next 
 toggle starts new cycle. */
 74         {
 75           printf("Fail...: %s\n", strerror(errno));
 76         }
 77         write_ctrl_line(gpiofd, RESB, 0);
 78         toggle_ctrl_line(gpiofd, PHI2);
 79         toggle_ctrl_line(gpiofd, PHI2);
 80         toggle_ctrl_line(gpiofd, PHI2);
 81         toggle_ctrl_line(gpiofd, PHI2);
 82         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) b 78
 Breakpoint 1 at 0x10a30: file buf65test.c, line 78.
 (gdb) r
 Starting program: /home/wjones/src/buf65test/buf65test
 Reset CPU...
 
 Breakpoint 1, main (argc=1, argv=0xbfffcdbc) at buf65test.c:78
 78         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) s
 Data at transceiver: 0
 [Inferior 1 (process 4147) exited normally]
 (gdb)
 
 
 Same thing happens with n(ext):
 rpi-ptrain# gdb -q buf65test
 Reading symbols from buf65test...done.
 (gdb) b 78
 Breakpoint 1 at 0x10a30: file buf65test.c, line 78.
 (gdb) r
 Starting program: /home/wjones/src/buf65test/buf65test
 Reset CPU...
 
 
 stepi doesn't work properly either, only executing two instructions before 
 giving up on breakpoints.
 Breakpoint 1, main (argc=1, argv=0xbfffcdbc) at buf65test.c:78
 78         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) n
 Data at transceiver: 0
 [Inferior 1 (process 834) exited normally]
 (gdb)
 
 rpi-ptrain# gdb -q buf65test
 Reading symbols from buf65test...done.
 (gdb) b 78
 Breakpoint 1 at 0x10a30: file buf65test.c, line 78.
 (gdb) r
 Starting program: /home/wjones/src/buf65test/buf65test
 sReset CPU...
 
 Breakpoint 1, main (argc=1, argv=0xbfffcdbc) at buf65test.c:78
 78         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) stepi
 0x00010a34      78         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) stepi
 0x00010a38      78         toggle_ctrl_line(gpiofd, PHI2);
 (gdb) stepi
 Data at transceiver: 0
 [Inferior 1 (process 848) exited normally]
 (gdb)
 
 The u(ntil) command doesn't work either. So basically, I have no 
 single-stepping. I have no idea whether this is related to the bug as 
 Christos described, but since it matches the symptoms, I figure it's worth 
 adding my feedback.
 
 Sincerely,
 
 --
 William D. Jones 
 



Home | Main Index | Thread Index | Old Index