From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 329073858D33; Wed, 25 Jan 2023 05:22:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 329073858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674624133; bh=4VqlcqRw2/leSy3fkG4LCiDAZGjWmftA7s5ZeiS+VK8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ccAddicuEFquAvCsRK00cKj4LniykahJPXKeLKqJUo7Ei1i5Cq/FgcJtege+IeaYA 0u+jJXdVWjvJ2GRg5ZJGNgIiRRmBlHTclkI/ATeqk5KAkVyoV06kaFyzZznoynx50Z crhszu3LTLajvy9dwksHoEkBps0fscnwHVb5YBK8= From: "mariappan.balraj at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug go/30038] When using CGO and C code is calling GO function, not getting call stack of C from core dump. Only getting call stack of GO. Date: Wed, 25 Jan 2023 05:22:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: go X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: mariappan.balraj at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D30038 --- Comment #2 from mariappan balraj --- Hi Tom Tromey, Thanks for looking into this. Please find the steps: 1) Create a directory named TEST 2) In TEST create 2 GO files, test.go and export.go =3D=3D=3D>test.go package main /* #include extern void Test4(void); void test1(void) { Test4(); } void test2(void) { int val =3D 2; test1(); } void test3(void) { int val =3D 3; test2(); } */ import "C" func main() { C.test3() } =3D=3D=3D>export.go package main import "C" //export Test4 func Test4() { panic("Panic inside Test4") } 3) Run "go mod init test" 4) Run "go mod tidy" 5) Run "go build ." 6) Run "sudo su" 7) Run "ulimit -c unlimited" 8) Run "echo "core" > /proc/sys/kernel/core_pattern" 9) Run "GOTRACEBACK=3Dcrash ./test" 10) Run "gdb ./test core.243539" Best Regards Mariappan On Tue, Jan 24, 2023 at 6:39 PM tromey at sourceware dot org < sourceware-bugzilla@sourceware.org> wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D30038 > > Tom Tromey changed: > > What |Removed |Added > > -------------------------------------------------------------------------= --- > CC| |tromey at sourceware dot > org > > --- Comment #1 from Tom Tromey --- > Could you say how to compile this? > > -- > You are receiving this mail because: > You reported the bug. > You are on the CC list for the bug. --=20 You are receiving this mail because: You are on the CC list for the bug.=