[MacPorts] #36802: GDB won't "step in" (s)
#36802: GDB won't "step in" (s) --------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: gdb --------------------+-------------------------------- Compile this program with {{{gcc -O0 -g x.c -o x}}}, then {{{ggdb x}}}. Enter {{{b main}}}, then {{{run}}}, then {{{s}}}. The program should be stopped on line 3 ({{{return 5}}}), but it's not. {{{ #!c int f() { return 5; } int main() { return !f(); } }}} -- Ticket URL: <https://trac.macports.org/ticket/36802> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+-------------------------------- Comment (by dave@…): Sorry, this was my own port@7.4.1 Now trying 7.5 and will close if invalid -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+-------------------------------- Comment (by dave@…): Works! I don't have permissions to close the ticket, but someone should -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+-------------------------------- Comment (by dave@…): I take it back. Modify the program by adding the {{{inline}}} keyword before {{{f}}}, and it's still broken. -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+-------------------------------- Comment (by dave@…): If I compile with {{{-finline-limit=0}}} I can "step in" again. Not sure if there's a bug in a tool or just with me :-) -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+---------------------- Reporter: dave@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+---------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => dweber@… * priority: High => Normal -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+---------------------- Reporter: dave@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+---------------------- Comment (by jmr@…): Seems odd that gcc would be inlining at -O0, but I think if the function is inlined, it's physically impossible to step into it because there's no code emitted for it. -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+---------------------- Reporter: dave@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+---------------------- Comment (by dave@…): There certainly is code emitted for inline functions, and I can step into them using the system gdb. {{{ pluto:/tmp dave% cat > tst.c inline int f() { return 5; } int main() { return !f(); } pluto:/tmp dave% /usr/bin/gcc -O0 -g tst.c -o tst pluto:/tmp dave% /usr/bin/gdb tst GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done (gdb) b main Breakpoint 1 at 0x100000ee4: file tst.c, line 8. (gdb) run Starting program: /private/tmp/tst Reading symbols for shared libraries +............................. done Breakpoint 1, main () at tst.c:8 8 return !f(); (gdb) s f () at tst.c:3 3 return 5; }}} -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36802: GDB won't "step in" (s) ---------------------+-------------------------------- Reporter: dave@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+-------------------------------- Changes (by mf2k@…): * owner: dweber@… => macports-tickets@… Comment: dweber has retired. See #43834. -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#36802: GDB won't "step in" (s) ---------------------+------------------------------- Reporter: dave@… | Owner: stuartwesterman@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: gdb | ---------------------+------------------------------- Changes (by mf2k@…): * owner: macports-tickets@… => stuartwesterman@… -- Ticket URL: <https://trac.macports.org/ticket/36802#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts