Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Preud'homme 0125e45595 Port pstack to amd64 architecture
This patch is an effort to port pstack to other architectures. So far
only amd64 is supported and there is probably still some issues in the
architecture independant code (endianness, integer range, per
architecture frame browsing, …).
2011-09-10 23:46:17 +02:00
Thomas Preud'homme ddc2702e4f Use strerror on syscall failure
Add strerror string to personalized error string on system call failure.
2011-09-10 23:46:17 +02:00
Thomas Preud'homme efb3b5d42b Don't segfault if no _DYNAMIC symbol is found
Test wether _DYNAMIC is found or not before using its value.
2011-09-10 23:46:17 +02:00
Thomas Preud'homme 8d28686a86 Fix incorrect error checking
pstack uses errno to check errors in lots of case which is wrong. According
to the errno manpage, errno is only significative when the sytem call return
an error. This patch fixes all the errno check errors.
2011-09-10 23:46:17 +02:00
Thomas Preud'homme ce2f83eaec Don't fail with shared object without name
pstack was failing with shared objects loaded by the dynamic linker which have
no name. This tiny patch makes pstack ignore those objects.
2011-09-10 23:46:17 +02:00
Thomas Preud'homme a0a2ced897 Remove pstack unconditionally in clean target.
Don't fail if pstack binary doesn't exist so that the clean target can be called
at any time.
2011-09-10 23:45:38 +02:00
Baruch Even 4a2f811a5e Improve error handling
* Add a call to perror when open fails
* Uses strtol instead of atoi to handle conversion error
* Call a usage fonction when PID is incorrect
* Display target PID when failing to attach
2011-09-10 23:43:10 +02:00
Thomas Preud'homme 35824dbd12 Initial commit (pstack v1.2) 2011-08-18 17:18:25 +02:00