From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 3FA03385843A for ; Thu, 1 Feb 2024 20:47:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FA03385843A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3FA03385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706820467; cv=none; b=KDozTRL2atMN8woo5TLu6ZYKSGh7fVV45iKPVA/Y4xSLNhor3J6EIDS6TSdzzvzR/23swlViexQ1OBxe6c7jDhv6s6xqAvqM2tr0a3uFvY+A+lo+CVJ0kr1jCW9r1yGnkbmyCsEVtcBQKMcaSBhyQt5jGBfjDIeoUqs/u3ZbA+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706820467; c=relaxed/simple; bh=P7M+hmXE57XwUXCnkuwXJiX34xMq8O7+FjJMOGgfF7c=; h=DKIM-Signature:Message-ID:Date:Subject:To:From:MIME-Version; b=ruTSt3PnxEWNAsvcTmDh0fz6R0ueD7Z0DSG1jmO0pj/1MK6JAd07Qf47PApg67LFPjuqaspR4cCJAjRd6DWNHQkpGsaDtf7PfSStwJs5rlYG8vFpfV+23F6mV0v3RoUpgNc/GLMlRx2zwJ9ZxBivtiWAKPuR7LvOVYAyIpoCtmQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 411JvuIM010162 for ; Thu, 1 Feb 2024 20:47:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=EhEcWR1nb/YyTmswY8nmPCy/HtO3CxLhPGCAKo5ypm8=; b=boOrgwnJJUFVs1z3WIsI0vusFcdlOXDxvT4k4ZwvPNG4KcZkGplFWsWvH+2C9OknxTXw aAovmx0AT9AKfwMMOZvSp1i42eXtwHO6tUwqm5xDeFWrLQmkS7FhZRMlGJMM3NMnwB6f zNBMQfzRxAbR4s2hciW9OM/U5BiE8JHqTPAS0//nzuiVAk1yAV3x+0qDYuBIa42nBdEa ZKzc2TBpLouSXxd2X1lm/soawgDmt7Aq4NVxAYBzSkoyBZw4upO9wuR/wxlfQ0SOyxVu XzIMQOM2PBDvNy9jcJF07iiDbnkpZUvimDaT+LhZrpe4EDT9t6WHz1HdUaG7lbur2TaC 1g== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w0hwp18dn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Feb 2024 20:47:40 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 411KWfYx018145 for ; Thu, 1 Feb 2024 20:45:37 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3vwcj0716m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Feb 2024 20:45:37 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 411KjarG17171170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Feb 2024 20:45:36 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6CAC25804B; Thu, 1 Feb 2024 20:45:36 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CBCE758055; Thu, 1 Feb 2024 20:45:35 +0000 (GMT) Received: from [9.67.188.151] (unknown [9.67.188.151]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 1 Feb 2024 20:45:35 +0000 (GMT) Message-ID: <23cc6882-22af-43be-acc2-a9056eccee38@linux.ibm.com> Date: Thu, 1 Feb 2024 12:45:35 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] gdb: Don't stop at non-statement line after stepping into inline function Content-Language: en-US To: gdb-patches@sourceware.org, Carl Love References: <20240201152118.598375-1-tlloyddavies@undo.io> <20240201152118.598375-3-tlloyddavies@undo.io> From: Carl Love In-Reply-To: <20240201152118.598375-3-tlloyddavies@undo.io> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: qxtK-nkKOaqjCObNYlJe-43G6_I6fo5K X-Proofpoint-ORIG-GUID: qxtK-nkKOaqjCObNYlJe-43G6_I6fo5K Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-01_06,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402010161 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Toby: A couple of things. First, I tried the series of patches on Power 10. I am getting failures for test gdb.dwarf2/dw2-inline-stepping-3.exp on Power. I attached the log file at the bottom of this message. I haven't had time yet to dig into the failures. I will take a look. Second, see below, there is a line where you define frame but I don't see any use of it? Am I missing something? On 2/1/24 07:21, Toby Lloyd Davies wrote: > Generally when stepping we only want to stop at lines that mark the > beginning of a statement i.e. have is_stmt set. However, when we stepped > into an inline function we would always stop regardless of whether > is_stmt was set on first line of the inline function. Fix this in > infrun.c:process_event_stop_test by not immediately stopping when > entering an inline function. Then code later in the function will decide > whether to stop based on whether is_stmt is set on the line. > Additionally, check if is_stmt is set on the line after stepping from an > inline callsite in infcmd.c:prepare_one_step. This fixes the bug when > the step starts directly at the inline function callsite. > --- > gdb/infcmd.c | 3 +- > gdb/infrun.c | 32 ++-- > .../gdb.dwarf2/dw2-inline-stepping-3.c | 50 ++++++ > .../gdb.dwarf2/dw2-inline-stepping-3.exp | 153 ++++++++++++++++++ > 4 files changed, 226 insertions(+), 12 deletions(-) > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp > > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > index 5e5f75021f2..22ab4dbebbc 100644 > --- a/gdb/infcmd.c > +++ b/gdb/infcmd.c > @@ -964,7 +964,8 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm) > fn = sym->print_name (); > > if (sal.line == 0 > - || !function_name_is_marked_for_skip (fn, sal)) > + || ((inline_skipped_frames (tp) || sal.is_stmt) > + && !function_name_is_marked_for_skip (fn, sal))) > { > sm->count--; > return prepare_one_step (tp, sm); > diff --git a/gdb/infrun.c b/gdb/infrun.c > index a782c115cad..927e464e479 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -8104,10 +8104,10 @@ process_event_stop_test (struct execution_control_state *ecs) > > if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL > || inline_frame_is_marked_for_skip (false, ecs->event_thread)) > - keep_going (ecs); > - else > - end_stepping_range (ecs); > - return; > + { > + keep_going (ecs); > + return; > + } > } > > /* Look for "calls" to inlined functions, part two. If the inline > @@ -8122,25 +8122,35 @@ process_event_stop_test (struct execution_control_state *ecs) > > if (ecs->event_thread->control.step_over_calls != STEP_OVER_ALL) > { > - /* For "step", we're going to stop. But if the call site > - for this inlined function is on the same source line as > - we were previously stepping, go down into the function > - first. Otherwise stop at the call site. */ > + /* For "step", if the call site for this inlined function is on the > + same source line as we were previously stepping, go down into the > + function first before deciding whether to stop. Otherwise stop at > + the call site. */ > > if (*curr_frame_id == original_frame_id > && call_sal.line == ecs->event_thread->current_line > && call_sal.symtab == ecs->event_thread->current_symtab) > { > step_into_inline_frame (ecs->event_thread); > + frame = get_current_frame (); Here, I don't see any use of frame. I tried commenting it out and the patch still seems to compile ok? > if (inline_frame_is_marked_for_skip (false, ecs->event_thread)) > { > keep_going (ecs); > return; > } > + else if (inline_skipped_frames (ecs->event_thread)) > + { > + end_stepping_range (ecs); > + return; > + } > + /* We are no longer at an inline function callsite. > + We use the checks further down to determine whether to stop. */ > + } > + else > + { > + end_stepping_range (ecs); > + return; > } > - > - end_stepping_range (ecs); > - return; > } > else > { > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c > new file mode 100644 > index 00000000000..3b6bc84fb05 > --- /dev/null > +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c > @@ -0,0 +1,50 @@ > +/* Copyright 2019-2024 Free Software Foundation, Inc. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +/* This test relies on foo and bar being inlined into main. */ > + > +volatile int global_var; > + > +static inline int __attribute__ ((always_inline)) > +foo () > +{ > + asm ("foo_label: .globl foo_label"); > + global_var++; /* foo inc global_var*/ > + asm ("foo_label2: .globl foo_label2"); > + return global_var; /* foo return global_var */ > +} /* foo end */ > + > +static inline int __attribute__ ((always_inline)) > +bar () > +{ > + asm ("bar_label: .globl bar_label"); > + global_var++; /* bar inc global_var*/ > + asm ("bar_label2: .globl bar_label2"); > + return global_var; /* bar return global_var */ > +} /* bar end */ > + > +int > +main () > +{ /* main prologue */ > + int ans; > + asm ("main_label: .globl main_label"); > + global_var = 0; /* main set global_var */ > + asm ("main_label2: .globl main_label2"); > + ans = foo (); /* main call foo */ > + asm ("main_label3: .globl main_label3"); > + asm ("nop"); ans = bar (); /* main call bar */ > + asm ("main_label4: .globl main_label4"); > + return ans; > +} /* main end */ > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp > new file mode 100644 > index 00000000000..ef864d943b3 > --- /dev/null > +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp > @@ -0,0 +1,153 @@ > +# Copyright 2019-2024 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > +# > +# This test checks that we stop at an inline callsite when returning > +# from a non-inlined function. Specifically when the first line of the > +# inline function does not have is_stmt set. > +# > +# Additionally, we check that when stepping into the inline function we > +# step past this first line without is_stmt set. We check two cases. One > +# where the inline callsite line contains no instructions (i.e. it > +# begins at the same address that the inline function begins). This > +# exercices the codepath in infcmd.c:prepare_one_step. The other is > +# when the inline callsite line contains one instruction. This exercises > +# the codepath in infrun.c:prepare_one_step. > + > +load_lib dwarf.exp > + > +# This test can only be run on targets which support DWARF-2 and use gas. > +require dwarf2_support > + > +# The .c files use __attribute__. > +require is_c_compiler_gcc > + > +standard_testfile .c .S > + > +set asm_file [standard_output_file $srcfile2] > +Dwarf::assemble $asm_file { > + global srcdir subdir srcfile srcfile2 > + declare_labels ranges_label lines_label foo_prog bar_prog > + > + lassign [function_range main [list ${srcdir}/${subdir}/$srcfile]] \ > + main_start main_len > + set main_end "$main_start + $main_len" > + > + set foo_call_line [gdb_get_line_number "main call foo"] > + set bar_call_line [gdb_get_line_number "main call bar"] > + > + cu {} { > + compile_unit { > + {language @DW_LANG_C} > + {name dw2-inline-stepping-2.c} > + {low_pc 0 addr} > + {stmt_list ${lines_label} DW_FORM_sec_offset} > + {ranges ${ranges_label} DW_FORM_sec_offset} > + } { > + bar_prog: subprogram { > + {name bar} > + {inline 3 data1} > + } > + foo_prog: subprogram { > + {name foo} > + {inline 3 data1} > + } > + subprogram { > + {external 1 flag} > + {name main} > + {low_pc $main_start addr} > + {high_pc "$main_start + $main_len" addr} > + } { > + inlined_subroutine { > + {abstract_origin %$foo_prog} > + {low_pc main_label2 addr} > + {high_pc main_label3 addr} > + {call_file 1 data1} > + {call_line $foo_call_line data1} > + } > + inlined_subroutine { > + {abstract_origin %$bar_prog} > + {low_pc bar_label addr} > + {high_pc main_label4 addr} > + {call_file 1 data1} > + {call_line $bar_call_line data1} > + } > + } > + } > + } > + > + lines {version 2} lines_label { > + include_dir "${srcdir}/${subdir}" > + file_name "$srcfile" 1 > + > + program { > + > + DW_LNE_set_address main_label > + line [gdb_get_line_number "main set global_var"] > + DW_LNS_copy > + > + DW_LNE_set_address main_label2 > + DW_LNS_negate_stmt > + line [gdb_get_line_number "foo inc global_var"] > + DW_LNS_copy > + DW_LNS_negate_stmt > + > + DW_LNE_set_address foo_label2 > + line [gdb_get_line_number "foo return global_var"] > + DW_LNS_copy > + > + DW_LNE_set_address main_label3 > + line [gdb_get_line_number "main call bar"] > + DW_LNS_copy > + > + DW_LNE_set_address bar_label > + DW_LNS_negate_stmt > + line [gdb_get_line_number "bar inc global_var"] > + DW_LNS_copy > + DW_LNS_negate_stmt > + > + DW_LNE_set_address bar_label2 > + line [gdb_get_line_number "bar return global_var"] > + DW_LNS_copy > + > + DW_LNE_set_address main_label4 > + line [gdb_get_line_number "return ans"] > + DW_LNS_copy > + > + DW_LNE_set_address $main_end > + DW_LNE_end_sequence > + } > + } > + > + ranges {is_64 [is_64_target]} { > + ranges_label: sequence { > + range ${main_start} ${main_end} > + } > + } > +} > + > +if { [prepare_for_testing "failed to prepare" ${testfile} \ > + [list $srcfile $asm_file] {nodebug}] } { > + return -1 > +} > + > +if ![runto_main] { > + return -1 > +} > + > +gdb_test "next" ".* main call foo.*" "step to foo callsite" > +gdb_test "step" ".* foo return global_var.*" "step to foo inc global_var" > + > +gdb_test "next" ".*main call bar.*" "step to bar callsite" > +gdb_test "step" ".* bar return global_var.*" "step to bar inc global_var" ------------------------------------------------------------------------ Here is the gdb log file from the test failures on Power 10 Test run by carll on Thu Feb 1 15:24:46 2024 Native configuration is powerpc64le-unknown-linux-gnu === gdb tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. Running /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp ... Executing on build: rm -rf /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3 (timeout = 300) builtin_spawn -ignore SIGHUP rm -rf /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3 get_compiler_info: gcc-13-2-1 Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/is_64_target.o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/is_64_target.c (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/is_64_target.o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/is_64_target.c Executing on host: gcc -fno-stack-protector /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c -fdiagnostics-color=never -g -lm -o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/func_addr.x (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c -fdiagnostics-color=never -g -lm -o /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/func_addr.x builtin_spawn /home/carll/bin/gdb -nw -nx -q -iex set height 0 -iex set width 0 (gdb) set height 0 (gdb) set width 0 (gdb) kill The program is not being run. (gdb) file /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/func_addr.x Reading symbols from /home/carll/GDB/build-next/gdb/testsuite/temp/3439835/func_addr.x... (gdb) p main_label - main $1 = 20 (gdb) disassemble main Dump of assembler code for function main: 0x000000001000065c <+0>: lis r2,4098 0x0000000010000660 <+4>: addi r2,r2,32512 0x0000000010000664 <+8>: std r31,-8(r1) 0x0000000010000668 <+12>: stdu r1,-64(r1) 0x000000001000066c <+16>: mr r31,r1 0x0000000010000670 <+20>: nop 0x0000000010000674 <+24>: addi r9,r2,-32472 0x0000000010000678 <+28>: li r10,0 0x000000001000067c <+32>: stw r10,0(r9) 0x0000000010000680 <+36>: nop 0x0000000010000684 <+40>: addi r9,r2,-32472 0x0000000010000688 <+44>: lwz r9,0(r9) 0x000000001000068c <+48>: addi r10,r9,1 0x0000000010000690 <+52>: nop 0x0000000010000694 <+56>: addi r9,r2,-32472 0x0000000010000698 <+60>: stw r10,0(r9) 0x000000001000069c <+64>: nop 0x00000000100006a0 <+68>: addi r9,r2,-32472 0x00000000100006a4 <+72>: lwz r9,0(r9) 0x00000000100006a8 <+76>: stw r9,32(r31) 0x00000000100006ac <+80>: nop 0x00000000100006b0 <+84>: nop 0x00000000100006b4 <+88>: addi r9,r2,-32472 0x00000000100006b8 <+92>: lwz r9,0(r9) 0x00000000100006bc <+96>: addi r10,r9,1 0x00000000100006c0 <+100>: nop 0x00000000100006c4 <+104>: addi r9,r2,-32472 0x00000000100006c8 <+108>: stw r10,0(r9) 0x00000000100006cc <+112>: nop 0x00000000100006d0 <+116>: addi r9,r2,-32472 0x00000000100006d4 <+120>: lwz r9,0(r9) 0x00000000100006d8 <+124>: stw r9,32(r31) 0x00000000100006dc <+128>: lwz r9,32(r31) 0x00000000100006e0 <+132>: extsw r9,r9 0x00000000100006e4 <+136>: mr r3,r9 0x00000000100006e8 <+140>: addi r1,r31,64 0x00000000100006ec <+144>: ld r31,-8(r1) 0x00000000100006f0 <+148>: blr 0x00000000100006f4 <+152>: .long 0x0 0x00000000100006f8 <+156>: .long 0x0 0x00000000100006fc <+160>: .long 0x1000180 End of assembler dump. (gdb) with print asm-demangle on -- x/2i main+160 0x100006fc : .long 0x1000180 0x10000700 : .long 0x1f8f0 (gdb) Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-30.o /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-30.o /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-31.o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3.S (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-31.o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3.S Executing on host: gcc -fno-stack-protector /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-30.o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-31.o -fdiagnostics-color=never -lm -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3 (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-30.o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-31.o -fdiagnostics-color=never -lm -o /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3 builtin_spawn /home/carll/bin/gdb -nw -nx -q -iex set height 0 -iex set width 0 (gdb) set height 0 (gdb) set width 0 (gdb) dir Reinitialize source path to empty? (y or n) y Source directories searched: $cdir:$cwd (gdb) dir /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2 Source directories searched: /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2:$cdir:$cwd (gdb) kill The program is not being run. (gdb) file /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3 Reading symbols from /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3... (gdb) delete breakpoints (gdb) info breakpoints No breakpoints or watchpoints. (gdb) break -qualified main Breakpoint 1 at 0x100006ac: file /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c, line 47. (gdb) run Starting program: /home/carll/GDB/build-next/gdb/testsuite/outputs/gdb.dwarf2/dw2-inline-stepping-3/dw2-inline-stepping-3 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, main () at /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.c:47 47 asm ("nop"); ans = bar (); /* main call bar */ (gdb) next 49 return ans; (gdb) FAIL: gdb.dwarf2/dw2-inline-stepping-3.exp: step to foo callsite step 0x00007ffff7a30a2c in __libc_start_call_main () from /lib64/libc.so.6 (gdb) FAIL: gdb.dwarf2/dw2-inline-stepping-3.exp: step to foo inc global_var next Single stepping until exit from function __libc_start_call_main, which has no line number information. [Inferior 1 (process 3439945) exited with code 02] (gdb) FAIL: gdb.dwarf2/dw2-inline-stepping-3.exp: step to bar callsite (the program exited) step The program is not being run. (gdb) FAIL: gdb.dwarf2/dw2-inline-stepping-3.exp: step to bar inc global_var (the program is no longer running) testcase /home/carll/GDB/build-next/gdb/testsuite/../../../binutils-next-gdb/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping-3.exp completed in 1 seconds === gdb Summary === # of unexpected failures 4 Executing on host: /home/carll/bin/gdb -nw -nx -q -iex "set height 0" -iex "set width 0" --version (timeout = 300) builtin_spawn -ignore SIGHUP /home/carll/bin/gdb -nw -nx -q -iex set height 0 -iex set width 0 --version GNU gdb (GDB) 15.0.50.20240201-git Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. /home/carll/bin/gdb version 15.0.50.20240201-git -nw -nx -q -iex "set height 0" -iex "set width 0" runtest completed at Thu Feb 1 15:24:47 2024