This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] libgloss/arm: Remove abort.
On 5/24/06, Jeff Johnston <jjohnstn@redhat.com> wrote:
I have one comment about the patch. It appears you have changed the
non-RDI behavior. Currently, non-RDI abort calls _exit(17) which ends
up being a call to _kill(17, -1). In your new scheme, the non-RDI abort
will end up calling _kill with some pid and a sig set to SIGABRT. This
doesn't match. I believe a simple check for SIGABRT in the non-RDI
section of _kill would allow exiting with the previous behavior if that
is truly intended.
-- Jeff J.
As you noted, the previous behaviour called SWI_Exit(17, -1). The
current behaviour calls SWI_Exit(SIGABRT, getpid()), which is
SWI_Exit(6, 1). Unless the exit code of 17 is defined by the (now
defunct) RDP/RDI/ADP standard, I don't see it being worth any special
effort to maintain the previous behaviour. I get the impression the
value 17 was chosen somewhat arbitrarily, because certain targets
appear to use it for the value of SIGABRT, although incidentally not
arm-elf, which uses the more typical value of 6. The value of -1 for
the pid argument was something I added myself rather recently --
previously it was undefined -- so I doubt anyone is relying on that
behaviour. I only maintained the RDI behaviour since that
ADP_Stopped_RunTimeError constant had provided itself to me so
conspicuously. What do you think, Jeff?
Cheers,
Shaun