summaryrefslogtreecommitdiffstats
path: root/lib/libproc
Commit message (Collapse)AuthorAgeFilesLines
* Consistently add the relocation offset only when the ELF type is notmarkj2013-11-111-7/+16
| | | | | | | | ET_EXEC. This fixes several problems with the DTrace pid provider not being able to match probes. Reviewed by: rpaulo MFC after: 2 weeks
* Modify the libproc breakpoint add/remove functions to stop the targetmarkj2013-11-051-7/+59
| | | | | | | | | | | | | | process if it has not already been stopped, since this is required for ptrace(2) to work. libdtrace does not seem to stop target processes before trying to remove their breakpoints, so we were previously failing to remove the breakpoint on r_debug_state() in rtld. This was causing processes to die with SIGTRAP if they called dlopen(3) after dtrace(1) had detached. Reported by: symbolics@gmx.com Reviewed by: rpaulo MFC after: 1 month
* Fix an off-by-one error when checking whether a given address is withinmarkj2013-10-291-2/+2
| | | | | | | | the extent of a symbol. Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in> Reviewed by: rpaulo MFC after: 1 week
* Revert r257248 and fix the problem in a way that doesn't violate style(9).markj2013-10-292-4/+3
| | | | Suggested by: jmg
* Fix the build with gcc.markj2013-10-281-1/+2
|
* Remove an incorrect debug printf.markj2013-10-281-1/+0
|
* Clean up the debug printing in libproc a bit. In particular:markj2013-10-276-33/+35
| | | | | | * Don't print any error messages to stderr unless DEBUG is defined. * Add a DPRINTFX macro for use when errno isn't set. * Print the error string from libelf when appropriate.
* Fix the libproc build when DEBUG is defined.markj2013-10-171-2/+2
|
* Fix the return value when we found a symbol in .dynstr. This nasty bug wasrpaulo2013-08-101-0/+1
| | | | preventing a lot of symbol lookups in dtruss -s, for example.
* - Compute the correct size to reallocate when doubling the size of thejhb2013-01-281-1/+2
| | | | | | | | | array of loaded objects to avoid a buffer overrun. - Use reallocf() to avoid leaking memory if the realloc() fails. PR: kern/175648 Submitted by: yuri@rawbw.com (1) MFC after: 1 week
* Fix libproc test case to work with clang premature optimizationpluknet2012-12-261-1/+1
| | | | | | | | | | observed with -O2 (used by default). Avoid function inlining for t1_bkpt_t on which we set a breakpoint. Otherwise the address of the function is never called thus the breakpoint never triggers. Reported by: zont Reviewed by: rpaulo
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-072-0/+11
| | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* When calling the C++ demangler, make sure to free the returned buffer,rpaulo2012-09-071-6/+24
| | | | | | which might have been reallocated. Pointed out by: stefanf
* Add support for demangling C++ symbols. This requires linking libproc withrpaulo2012-09-062-2/+22
| | | | | | libc++rt/libsupc++. Discussed with: theraven
* Fix test cases to work with the latest version of the API.rpaulo2012-09-062-3/+4
|
* Make sure we visit both symbol sections even if one of them doesn'trpaulo2012-09-021-24/+21
| | | | exist. This makes it possible to dtrace some C++ programs like devd.
* Make libproc compilable for MIPSgonzo2012-03-232-0/+11
|
* fix a serious bug in libproc's proc_attachavg2011-08-031-2/+1
| | | | | | | | | | proc_attach always frees any struct proc_handle data that it allocates, but that is supposed to be done only in error conditions. PR: bin/158431 Approved by: re (kib) MFC after: 1 week
* Fix a memory leak on the error conditionkevlo2010-12-141-1/+1
| | | | Reviewed by: rpaulo
* Ignore EINTR when calling waitpid.rpaulo2010-09-181-1/+2
|
* Several fixes for libproc:rpaulo2010-08-115-9/+25
| | | | | | | | o return the correct status in proc_wstatus() o proc_read takes a void * o correctly allocate the objs structure array Sponsored by: The FreeBSD Foundation
* Revert SHLIB_MAJOR to 2.rpaulo2010-07-311-1/+1
| | | | | As discussed with kan@, since DTrace is the only consumer of libproc right now, there's no need for a major shlib bump.
* Bump the shared library major version due to ABI conflicts.rpaulo2010-07-311-1/+1
| | | | Sponsored by: The FreeBSD Foundation
* New version of libproc. Changes are:rpaulo2010-07-3116-76/+1316
| | | | | | | | | | | * breakpoint setup support * register query * symbol to address mapping and vice-versa * more misc utility functions based on their Solaris counterpart Also, I've written some test cases. Sponsored by: The FreeBSD Foundation
* Removed redundant -I. from CFLAGS and "yes" from WITHOUT_MAN.ru2010-02-251-2/+2
|
* Build lib/ with WARNS=6 by default.ed2010-01-021-2/+0
| | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* Merge latest DTrace changes from Perforce.rodrigc2008-11-052-3/+10
| | | | | | Update libproc API to reflect new changes. Approved by: jb
* Add the Makefile for the process library which was missed in the previousjb2008-05-221-0/+20
| | | | commit.
* Add a process library with some stubs that the DTrace client needs.jb2008-05-225-0/+473
These will be fleshed out as part of the DTrace userland tracing development. For now, the kernel tracing part of DTrace requires minimal functionality for this library. The API for this library is deliberately different from the libproc in OpenSolaris due to licensing restrictions.
OpenPOWER on IntegriCloud