summaryrefslogtreecommitdiffstats
path: root/lib/libproc/proc_sym.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove an incorrect and useless debug print.markj2014-10-041-3/+1
| | | | X-MFC-With: r272488
* Hook up support for userland CTF support in DTrace. This required somemarkj2014-10-031-4/+37
| | | | | | | | | | | | | | | | | | modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division
* Factor out some of the duplicated code in the symbol lookup functions, inmarkj2014-09-251-146/+122
| | | | | | | preparation for adding userland CTF support to DTrace. MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
* Fix a bug in r265255: only return NULL if the requested map wasn't found.markj2014-08-241-4/+6
| | | | | Submitted by: Luke Chang-Hsien Tsai <luke.tw@gmail.com> MFC after: 1 week
* In r268463, I misplaced a return in demangle(), causing the function todim2014-08-091-8/+2
| | | | | | | | | | | | erroneously skip symbols that were not mangled at all. Fix this by moving the return into the preceding if block. While here, simplify the code by letting __cxa_demangle() allocate the needed space for the demangled symbol. This also fixes a memory leak, which would occur whenever __cxa_demangle() failed. Reported by: pgj MFC after: 3 days
* In libproc, avoid calling __cxa_demangle(), and thus depending on eitherdim2014-07-091-17/+18
| | | | | | | libcxxrt or libsupc++, if WITHOUT_CXX is defined. Noticed by: sbruno MFC after: 1 week
* Allow "a.out" as an alias for the executable if no other matching entriesmarkj2014-05-031-9/+16
| | | | | | | are found. This improves compatibility with Solaris' libproc and fixes a number of failing DTrace tests that rely on this feature. MFC after: 3 weeks
* Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain themarkj2014-04-141-3/+3
| | | | | | | first address after the end of the map entry and should therefore be excluded. MFC after: 2 weeks
* 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
* 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
* Remove an incorrect debug printf.markj2013-10-281-1/+0
|
* Clean up the debug printing in libproc a bit. In particular:markj2013-10-271-13/+13
| | | | | | * 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 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.
* 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-061-2/+12
| | | | | | libc++rt/libsupc++. Discussed with: theraven
* 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.
* Several fixes for libproc:rpaulo2010-08-111-0/+11
| | | | | | | | 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
* New version of libproc. Changes are:rpaulo2010-07-311-12/+497
| | | | | | | | | | | * 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
* Add a process library with some stubs that the DTrace client needs.jb2008-05-221-0/+68
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