[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] QNX support
From: |
Fischer, Matt |
Subject: |
[Libunwind-devel] QNX support |
Date: |
Fri, 12 Apr 2013 22:48:07 +0000 |
Hi all. I'm interested in using libunwind on the QNX operating system, and
started looking into what would be involved in doing that. QNX has a number of
stupidities^H^H^H^Hidiosyncrasies that I needed to deal with in order to get it
building, like some nonstandard header locations, etc., but I think I have a
set of changes put together that gets a very basic configuration up and
building. I'm attaching a patch that contains the work I've done so far, and I
was wondering if I could get any comments on it. It's a hodgepodge of
different things, so I could split them up into pieces before actually
submitting, if that would be better.
A quick summary:
* At the moment, I'm only interested in remote unwinding, so while I would like
eventually add support for local unwinding on QNX, I can start out by simply
disabling that. Since currently the only time libunwind disables local
unwinding is when it's building a cross-analyzer, I added a new configure
switch (--(enable|disable)-local) which allows the user to explicitly disable
local unwinding if desired.
* Similarly, ptrace support was being built unconditionally. I added an
--(enable|disable)-ptrace flag to allow explicit control over this, and set the
default based on whether sys/ptrace.h exists.
* For some mysterious reason, QNX puts elf.h under sys/, so I added a bit of
logic in libunwind_i.h to include it from that location when building on QNX.
* QNX also doesn't have <endian.h>, so the normal endianness logic will not
work. However, the compiler declares the macros
__BIGENDIAN__/__LITTLEENDIAN__, so I added code to check those when building
for QNX.
* Finally, the silly QNX compiler, qcc, doesn't understand the flag
-nostartfiles unless you prefix it with -Wc, to pass it on to the underlying
GCC compiler, so I added some logic to test for QCC and make the appropriate
changes.
These changes are enough to get libunwind building if you pass --disable-local
--disable-coredump during configure. Support for the remaining pieces can
probably be added later on as well, but I thought I would at least start the
dialogue here by discussing these changes. Are these modifications something
that could be added to the project? I'll be happy to tweak them if there are
things I missed, or additional work you'd like to see done first.
Thanks,
Matt
________________________________
CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of
the intended recipient(s) and contain information that may be confidential
and/or legally privileged. If you have received this email in error, please
notify the sender by reply email and delete the message. Any disclosure,
copying, distribution or use of this communication (including attachments) by
someone other than the intended recipient is prohibited. Thank you.
0001-Added-basic-QNX-support.patch
Description: 0001-Added-basic-QNX-support.patch
- [Libunwind-devel] QNX support,
Fischer, Matt <=