public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stanislav.simek at siemens dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99649] GDB has issue to show backtrace if the breakpoint is in a function with more then 8 parameters - only for target aarch64-elf ILP32
Date: Fri, 14 May 2021 07:46:49 +0000	[thread overview]
Message-ID: <bug-99649-4-o7pv0OA91Y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99649-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99649

--- Comment #7 from Stanislav Šimek <stanislav.simek at siemens dot com> ---
(In reply to Richard Biener from comment #3)
> It sounds like this should be a bug for gdb.


Hi all,
I would like to add more information for this topic:

This error occurs in case that your function, call the function that has more
than 8 params.

Eq.
int sum(int x1,int x2 int x3,int x4,int x5,int x6,int x7,int x8,int x9 ); 

int test(int input1 ) 
{
  int c = 0;

  if(input1 == 2) // <- If you have breakpoint here, callstack is corrupted
  {
    c +=input1;
  }

  c =sum(1,2,3,4,5,6,7,c,input1);
  return c;
}


If you remove the call of sum function, then everything works.
If you optimize function " int test(int) " with O0,O1 and O3, it works
Only for O2 this problem occurs.

So isn't it gcc problem?

      parent reply	other threads:[~2021-05-14  7:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 15:57 [Bug c/99649] New: GDB has issue to show backtrace if the breakpoint is in a function with more then 8 parameters only in " filip.bascarevic at siemens dot com
2021-03-18 16:04 ` [Bug c/99649] GDB has issue to show backtrace if the breakpoint is in a function with more then 8 parameters - only for " pinskia at gcc dot gnu.org
2021-03-18 16:23 ` filip.bascarevic at siemens dot com
2021-03-19  7:41 ` [Bug target/99649] " rguenth at gcc dot gnu.org
2021-03-22 13:40 ` filip.bascarevic at siemens dot com
2021-05-07  7:28 ` stanislav.simek at siemens dot com
2021-05-07  7:43 ` stanislav.simek at siemens dot com
2021-05-14  7:46 ` stanislav.simek at siemens dot com [this message]

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-99649-4-o7pv0OA91Y@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).