From: Douglas B Rupp <rupp@gnat.com>
To: gcc@gcc.gnu.org
Cc: rth@redhat.com
Subject: Multiple calls to case NOTE_INSN_EPILOGUE_BEG for same function?
Date: Sun, 12 Jul 2009 19:30:00 -0000 [thread overview]
Message-ID: <4A5A39BE.6010901@gnat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
I've been working on bringing the VMS patches up to date. The VMS
Debugger requires a label at end prologue and begin_epilogue, and the
fact that final_scan_insn makes multiple calls to NOTE_INSN_EPILOGUE_BEG
for the same function makes this awkward. I suppose it could be case
that there are multiple epilogues in a function, but the generated
assembly code doesn't seem to indicate this. Below is an excerpt from a
gdb session, and attached is a file derived from argv.c.
Can someone please explain why this happens and if a bug, please advise
on how to fix?
--Douglas Rupp
AdaCore
Breakpoint 3, emit_note (kind=NOTE_INSN_EPILOGUE_BEG)
at ../../gcc-head-src-orig/gcc/emit-rtl.c:4678
4678 {
(gdb) c
Continuing.
Breakpoint 4, final_scan_insn (insn=0x2a95dcc440, file=0x1083a10,
optimize=Variable "optimize" is not available.
)
at ../../gcc-head-src-orig/gcc/final.c:1895
1895 targetm.asm_out.function_begin_epilogue (file);
(gdb) print last_linenum
$4 = 24
(gdb) c
Continuing.
Breakpoint 4, final_scan_insn (insn=0x2a95dcc400, file=0x1083a10,
optimize=Variable "optimize" is not available.
)
at ../../gcc-head-src-orig/gcc/final.c:1895
1895 targetm.asm_out.function_begin_epilogue (file);
(gdb) print last_linenum
$5 = 24
[-- Attachment #2: argv.c.txt --]
[-- Type: text/plain, Size: 793 bytes --]
int gnat_argc = 0;
const char **gnat_argv = (const char **) 0;
const char **gnat_envp = (const char **) 0;
int
__gnat_arg_count (void)
{
return gnat_argc;
}
int
__gnat_len_arg (int arg_num)
{
if (gnat_argv != 0)
return __builtin_strlen (gnat_argv[arg_num]);
else
return 0;
}
void
__gnat_fill_arg (char *a, int i)
{
if (gnat_argv != 0)
__builtin_strncpy (a, gnat_argv[i], __builtin_strlen(gnat_argv[i]));
}
int
__gnat_env_count (void)
{
int i;
for (i = 0; gnat_envp[i]; i++)
;
return i;
}
int
__gnat_len_env (int env_num)
{
if (gnat_envp != 0)
return __builtin_strlen (gnat_envp[env_num]);
else
return 0;
}
void
__gnat_fill_env (char *a, int i)
{
if (gnat_envp != 0)
__builtin_strncpy (a, gnat_envp[i], __builtin_strlen (gnat_envp[i]));
}
next reply other threads:[~2009-07-12 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-12 19:30 Douglas B Rupp [this message]
2009-07-15 17:57 ` Richard Henderson
2009-07-15 19:36 ` Douglas B Rupp
2009-07-16 0:28 ` Douglas B Rupp
2009-07-16 15:09 ` Richard Henderson
2009-07-16 15:20 ` Douglas B Rupp
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=4A5A39BE.6010901@gnat.com \
--to=rupp@gnat.com \
--cc=gcc@gcc.gnu.org \
--cc=rth@redhat.com \
/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).