This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Multiple calls to case NOTE_INSN_EPILOGUE_BEG for same function?



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



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]));
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]