Commit Graph

32 Commits

Author SHA1 Message Date
Matteo Cypriani 150a89bb40 improve markup 2016-11-02 01:16:55 +01:00
Thomas Preud'homme 6dbd036eea Rename README to accomodate gogs 2016-11-01 21:25:14 +00:00
Thomas Preud'homme f0aa8400b7 Ignore VDSO object
Do not try to load symbols from VDSO as it does not correspond to any
file on disk.
2014-02-28 23:27:45 +08:00
Thomas Preud'homme d75a8ea2a1 Makefile cleaning
Use $^ instead of explicitely listing .c files in recipe.
2012-10-22 11:22:05 +02:00
Thomas Preud'homme fe2590b471 Honour *FLAGS
Honour CPPFLAGS and LDFLAGS in addition to CFLAGS
2012-10-22 11:21:13 +02:00
Thomas Preud'homme 8ade3d5cb9 New release: pstack 1.3.1 2011-10-05 22:57:10 +02:00
Thomas Preud'homme 8a440f169b Error out if no object file header
Quit the program if object file header can't be read or is smaller than
2011-10-05 22:56:37 +02:00
Thomas Preud'homme a8f2e34c5f Make struct used by PTRACE_GETREGS arch-dependant
Structure used by ptrace in PTRACE_GETREGS mode is unfortunetely
arch-dependant. Although pt_regs seems portable, it's only designed to
represent the way registers are stored on the stack during system call.
The right struct to use is defined in sys/user.h and is
user_regs_struct on x86-{32,64} and user_regs on armel.
2011-10-05 17:38:17 +02:00
Thomas Preud'homme 1cede92011 Compile with -g -O2 by default
Change default CFLAGS (CFLAGS not overriden and no CFLAGS in
environment) to add debugging symbol and optimize the generated code.
2011-10-05 17:38:17 +02:00
Thomas Preud'homme c86ed77fb2 Don't include .*ignore files in archives
* Remove .cvsignore
* Exclude .gitignore and .gitattribute itself from archives produced
  with git archive
2011-10-03 22:51:02 +02:00
Thomas Preud'homme 3ec09496b9 Rewrite archive and cvstag make rules for git
* Rename cvstag to gittag
* Adapt archive and gittag make rules to git
2011-10-03 22:51:02 +02:00
Thomas Preud'homme 27599168da Support DESTDIR and PREFIX variables in Makefile
* Add support for DESTDIR and PREFIX variables in Makefile.
  PREFIX defaults to /usr and DESTDIR is not defined by default.
* Redefine MANDIR and BINDIR in function of PREFIX and DESTDIR. Note
  that DESTDIR for overriden variables (variables defined via make
  VAR=value construct)
2011-10-03 21:47:55 +02:00
Thomas Preud'homme ee32fa3624 Respect CFLAGS from the environment 2011-10-03 19:36:33 +02:00
Thomas Preud'homme d0e37451f5 Remove distribution specific variables in Makefile
Remove everything related to RPM_OPT_FLAGS variable in Makefile.
2011-10-03 19:35:16 +02:00
Thomas Preud'homme b455f99538 Add -Wextra flags to CFLAGS and fix warnings 2011-10-03 19:32:16 +02:00
Thomas Preud'homme 6f25ab2494 Fix incorrect ptrace failure tests in crawl() 2011-10-02 23:50:22 +02:00
Thomas Preud'homme 3ce8c91fd9 New release: pstack 1.3 2011-10-02 22:22:28 +02:00
Thomas Preud'homme 3172e4c057 Add .gitignore file
Ignore pstack binary
2011-10-02 22:22:28 +02:00
Thomas Preud'homme 56bbbfe59e Remove distribution files
Remove pstack.spec and adapt Makefile to the change.
2011-10-02 22:22:28 +02:00
Thomas Preud'homme eb46b84ec3 Do not call perror in crawl() if no ptrace error
* Set error_occured in crawl() whether an error occurs or not in one of
  the ptrace call of crawl().
* Call perror at end of crawl() only if error_occured is set.
2011-10-02 20:22:02 +02:00
Thomas Preud'homme b26e46a5ae Include <endian.h> as fallback for endianness
Include <endian.h> if none of __ORDER_LITTLE_ENDIAN__ and
__ORDER_BIG_ENDIAN__ are predefined (too old version of gcc) in order to
determine endianness.
2011-10-02 19:53:16 +02:00
Thomas Preud'homme a8f2de4912 Add support for armel architecture
* Define architecture dependant macro for armel;
* Use struct pt_regs instead of struct user_regs_struct;

See for more details on armel
2011-10-02 19:50:48 +02:00
Thomas Preud'homme 22ab00d6ca Separate arch dependant and arch independant code
Extract explicit architecture dependant code into 2 sets of macros at
the beginning of the source file:
  - 1 set of macros for architecture dependant code;
  - 1 set of macros for architecture independant code.
2011-10-02 19:50:48 +02:00
Thomas Preud'homme b04a71ce9e Fix compilation on i386 arch.
Remove useless __ASSEMBLY definition as:
* it is useless
* it makes pstack fails to build
2011-09-11 15:42:59 +02:00
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