From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4003C386F802; Fri, 10 May 2024 20:10:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4003C386F802 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715371853; bh=VuX/iqcSMGs8H1uQKIu4MZ49tvPfFr1mfYaLr9bpAq4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V8kzDFNsbeeCOXmZ2QFyzcClqQvLun2wWNk839f8dJDCyrhyBrPcNjvoZ7n72+kzo mYQlAKXV+QEKvYaC9wqLE8jRyrxWfE5ERJaG6QY8SCmveLKB3+R4DdYRjw5mvX+zgg f81/6jsXgSLu2AK8wa+yPk4amRYMP+VBXXmeqf2Q= From: "kevinb at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31563] Problems with accessing errno Date: Fri, 10 May 2024 20:10:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kevinb at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: kevinb at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31563 Kevin Buettner changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #4 from Kevin Buettner --- Regarding the type of __errno_location... When I run the test, compiled with -g3, on a machine without installed glibc debuginfo and also with debuginfod disabled, I see: (gdb) p errno '__errno_location' has unknown return type; cast the call to its declared return type But, when I look at the DWARF for the binary, I see: <1><32>: Abbrev Number: 2 (DW_TAG_subprogram) <33> DW_AT_external : 1 <33> DW_AT_name : (indirect string, offset: 0x1f7e): __errno_location <37> DW_AT_decl_file : 2 <38> DW_AT_decl_line : 37 <39> DW_AT_decl_column : 13 <3a> DW_AT_prototyped : 1 <3a> DW_AT_type : <0x3e> <3e> DW_AT_declaration : 1 <1><3e>: Abbrev Number: 3 (DW_TAG_pointer_type) <3f> DW_AT_byte_size : 8 <40> DW_AT_type : <0x44> <1><44>: Abbrev Number: 4 (DW_TAG_base_type) <45> DW_AT_byte_size : 4 <46> DW_AT_encoding : 5 (signed) <47> DW_AT_name : int So gdb could know the type if it didn't ignore it. (It is ignored in read_func_scope in gdb/dwarf2/read.c due to not having low and high pc attributes.) --=20 You are receiving this mail because: You are on the CC list for the bug.=