public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "mariappan.balraj at gmail dot com" <sourceware-bugzilla@sourceware.org>
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: Mon, 13 Feb 2023 09:41:21 +0000	[thread overview]
Message-ID: <bug-30038-4717-2PJ4eB51lX@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30038-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30038

--- Comment #4 from mariappan balraj <mariappan.balraj at gmail dot com> ---
Hello GDB experts,

Can someone please help to resolve this issue?

Best Regards
Mariappan

On Wed, Jan 25, 2023 at 10:51 AM mariappan balraj <
mariappan.balraj@gmail.com> wrote:

> 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
>
> ===>test.go
>
> package main
>
> /*
> #include <stdio.h>
>
> extern void Test4(void);
>
> void test1(void) {
>    Test4();
> }
>
> void test2(void) {
>     int val = 2;
>     test1();
> }
>
> void test3(void) {
>     int val = 3;
>     test2();
> }
> */
> import "C"
>
> func main() {
>     C.test3()
> }
>
> ===>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=crash ./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=30038
>>
>> Tom Tromey <tromey at sourceware dot org> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>                  CC|                            |tromey at sourceware dot
>> org
>>
>> --- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
>> 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.
>
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-02-13  9:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24  6:54 [Bug go/30038] New: " mariappan.balraj at gmail dot com
2023-01-24  6:55 ` [Bug go/30038] " mariappan.balraj at gmail dot com
2023-01-24 13:09 ` tromey at sourceware dot org
2023-01-25  5:22 ` mariappan.balraj at gmail dot com
2023-02-06  5:51 ` mariappan.balraj at gmail dot com
2023-02-13  9:41 ` mariappan.balraj at gmail dot com [this message]
2023-02-14  6:12 ` tromey at sourceware dot org
2023-02-14  6:28 ` mariappan.balraj at gmail dot com
2023-02-14  7:54 ` tromey at sourceware dot org
2023-02-14 10:29 ` mariappan.balraj at gmail dot com
2023-02-14 17:39 ` tromey at sourceware dot org
2023-02-15  5:54 ` mariappan.balraj at gmail dot com
2023-02-15 11:24 ` mariappan.balraj at gmail dot com
2023-02-15 18:17 ` tromey at sourceware dot org
2023-02-16 23:38 ` ian at airs dot com
2023-02-17  1:21 ` tromey at sourceware dot org
2023-02-22  5:10 ` mariappan.balraj at gmail dot com
2023-02-28  1:40 ` tromey at sourceware dot org
2023-04-03 11:59 ` mariappan.balraj at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30038-4717-2PJ4eB51lX@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).