| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Teach libproc how to find debugging symbols in /usr/lib/debug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.
|
|
|
|
|
| |
Allow "a.out" as an alias for the executable if no other matching entries
are found.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r268463, I misplaced a return in demangle(), causing the function to
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
PR: base/191981
|
|
|
|
|
| |
If the traced process stops because it received a signal, libproc needs
to ensure that the signal is forwarded when proc_continue() is called.
|
|
|
|
|
|
|
|
|
|
| |
In libproc, avoid calling __cxa_demangle(), and thus depending on either
libcxxrt or libsupc++, if WITHOUT_CXX is defined. [1]
Noticed by: sbruno
[1] However, on stable/10 this is more accurately described by
WITHOUT_GNUCXX, so I've changed the test to that instead.
|
|
|
|
|
|
| |
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.
|
|
|
|
|
|
| |
Consistently add the relocation offset only when the ELF type is not
ET_EXEC. This fixes several problems with the DTrace pid provider not
being able to match probes.
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the libproc breakpoint add/remove functions to stop the target
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.
|
|
|
|
|
| |
Fix an off-by-one error when checking whether a given address is within
the extent of a symbol.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r256661:
Fix the libproc build when DEBUG is defined.
MFC r257222:
Clean up the debug printing in libproc a bit. In particular:
* 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.
MFC r257235:
Remove an incorrect debug printf.
MFC r257248:
Fix the build with gcc.
MFC r257298:
Revert r257248 and fix the problem in a way that doesn't violate style(9).
|
|
|
|
| |
preventing a lot of symbol lookups in dtruss -s, for example.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
which might have been reallocated.
Pointed out by: stefanf
|
|
|
|
|
|
| |
libc++rt/libsupc++.
Discussed with: theraven
|
| |
|
|
|
|
| |
exist. This makes it possible to dtrace some C++ programs like devd.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed by: rpaulo
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
As discussed with kan@, since DTrace is the only consumer of libproc
right now, there's no need for a major shlib bump.
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Update libproc API to reflect new changes.
Approved by: jb
|
|
|
|
| |
commit.
|
|
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.
|