summaryrefslogtreecommitdiffstats
path: root/usr.bin/gcore
Commit message (Collapse)AuthorAgeFilesLines
* MFC 281266:jhb2015-06-021-18/+0
| | | | | | | | | | | | Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h> and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in <sys/procfs.h> to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from <sys/procfs.h> in gcore's elf32 core dump code instead of duplicating the definitions.
* MFC 269128:jhb2015-06-023-15/+123
| | | | | | Create 32-bit core files for 32-bit processes on 64-bit machines. The 64-bit machine supported right now is amd64, but it's not too hard to add powerpc64.
* MFC 278761:jhb2015-04-011-1/+2
| | | | | | Include OBJT_PHYS VM objects in ELF core dumps. In particular this includes the shared page allowing debuggers to use the signal trampoline code to identify signal frames in core dumps.
* MFC 274817,274878,276801,276840,278976:jhb2015-02-231-0/+35
| | | | | | | | | | | | | | | | Improve support for XSAVE with debuggers. - Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed to match what Linux does in that 1) it dumps the entire XSAVE area including the fxsave state, and 2) it stashes a copy of the current xsave mask in the unused padding between the fxsave state and the xstate header at the same location used by Linux. - Teach readelf() to recognize NT_X86_XSTATE notes. - Change PT_GET/SETXSTATE to take the entire XSAVE state instead of only the extra portion. This avoids having to always make two ptrace() calls to get or set the full XSAVE state. - Add a PT_GET_XSTATE_INFO which returns the length of the current XSTATE save area (so the size of the buffer needed for PT_GETXSTATE) and the current XSAVE mask (%xcr0).
* Add some missing DPADD.antoine2013-05-111-1/+1
|
* Wrong cast.trociny2013-04-201-2/+1
| | | | MFC after: 1 month
* Sync gcore(1) with the recent changes in kernel code aimed at addingtrociny2013-04-202-203/+374
| | | | | | | procstat notes to a process core file. Suggested by: jhb MFC after: 1 month
* Match size_t and ssize_t by using %zu and %zd instead of %d.delphij2011-07-111-1/+1
| | | | MFC after: 1 month
* Start sentences on a new line to ease life for translators. Tweak thejhb2010-12-281-7/+8
| | | | | | wording in a few places. MFC after: 1 week
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-113-12/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Add the ability for GDB to printout the thread name along with otherattilio2010-11-221-0/+11
| | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks
* Fix spelling.attilio2010-07-141-5/+5
| | | | | | | Sponsored by: Sandvine Incorporated Submitted by: b.f. <bf1783 at googlemail dot com> MFC after: 2 weeks X-MFC: 210063
* Fix the way the segments are included in the gcore outputs (with theattilio2010-07-144-11/+30
| | | | | | | | | | | | | | | | | | | default invokation): - Right now if segments are not writable are not included. Remove this. - Right now if a segment is mapped with NOCORE the check is not honoured. Change this by checking the newly added flag, from libutil, KVME_FLAG_NOCOREDUMP. Besides that, add a new flag (-f) that forces a 'full' dump of all the segments excluding just the malformed ones. This might be used very carefully as, among the reported segments, there could be memory mapped areas that could be vital to program execution. Sponsored by: Sandvine Incorporated Discussed with: kib Reviewed by: emaste Tested by: Sandvine Incorporated MFC after: 2 weeks
* Fixed dependencies (make checkdpadd).ru2010-02-251-1/+2
|
* Fix gcore so that it can have the '-s' flag without hanging.mjacob2010-02-052-27/+19
|
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* Change gcore in order to get rid of the procfs accesses and use FreeBSD'sattilio2009-11-254-198/+185
| | | | | | | | | | | | | | | | | | | | | specific sysctls and ptrace interfaces. This change switches a bit gcore POLA that is summarized here: - now gcore can recognize threads within the process and handle dumps on thread-scope - the process to be analyzed will be stopped during its gcore run - gcore may not work with processes which are actively being analyzed by gdb or truss - the ptrace interface may cause syscalls to return EINTR, thus interferring with signals handling within the process Side note: <janitor task> the interface can be further lifted in order to get rid of the very last procfs interfaces remnants and made more suitable for copying with sysctl/ptrace interface </janitor task>. Obtained from: Sandvine Incorporated Reviewed by: emaste, rwatson Sponsored by: Sandvine Incorporated MFC: 1 month
* Use %zu for size_t, not %zd.emaste2009-09-231-3/+3
| | | | | Submitted by: ru MFC after: 1 week
* Use %zd for size_t. With this gcore(1) is WARNS=6 clean.delphij2008-07-181-3/+3
|
* Eliminate memory leak from an accidental malloc().emaste2007-04-101-1/+0
|
* Make gcore(1) 64 bit safe. It was trying to parse the /proc/*/map filepeter2006-03-251-3/+3
| | | | | | | | | using sscanf and truncating the start/end entries by writing them with a 32 bit int descriptor (%x). The upper bytes of the 64 bit vm_offset_t variables (for little endian machines) were uninitialized. For big endian machines, things would have been worse because it was storing the 32 bit value in the upper half of the 64 bit variable. I've changed it to use %lx and long types. That should work on all our platforms.
* Remove a.out support from gcore(1).das2004-11-272-249/+0
|
* gcore(1) apparently still cares about a.out core dumps, so it stilldas2004-11-201-0/+2
| | | | | | needs to know that a 1-page U area is part of the dump format. Reviewed by: arch@
* Teach gcore about the pathname field of '/proc/*/map' so that it doesn'trwatson2004-07-121-3/+3
| | | | | | | spin when its parser gets confused by a lack of end-of-line. Submitted by: Dan Nelson <dan@dan.emsphone.com> PR: 68839
* Deal with double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+4
|
* Fix some WARNS:dwmalone2004-02-153-8/+7
| | | | | | 1) Remove some unused variables. 2) Mark some things aas static or __unused. 3) Cast to make sure we're comparing the same types.
* Add #include <sys/queue.h> for sparc64's benefit. The MD includes therepeter2002-09-131-0/+1
| | | | have less polution.
* Use a crowbar to move the a.out code out of gcore.c and into its ownpeter2002-09-137-577/+68
| | | | | | file so that we have a chance of using gcore on non-i386 platforms. Use linker sets to reduce the registration glue. Remove md-sparc.c, we do not have an a.out sparc32 port. aoutcore.c was repocopied from gcore.c.
* Include stdint.h to make this compile.iedowse2002-09-051-0/+1
| | | | Submitted by: Garance A Drosihn <drosih@rpi.edu>
* ANSIify function definitions.dwmalone2002-09-044-14/+19
| | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
* Consistently wrap CSRG SCM ID.obrien2002-06-303-4/+6
| | | | Requested by: bde
* Consistently use FBSDIDobrien2002-06-304-6/+4
|
* Use `The .Nm utility'charnier2002-04-191-10/+13
|
* Do not print error message twice.charnier2002-04-122-6/+10
|
* Don't use gcc specific flags.dwmalone2002-03-301-1/+0
|
* Add FBSDID. Do not \n terminate err() strings. Spelling.charnier2002-03-261-5/+6
|
* remove __Pimp2002-03-223-15/+16
|
* Removed unused include of kernel-only file <sys/lock.h>.bde2001-10-131-1/+0
|
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-102-2/+0
|
* KSE Milestone 2julian2001-09-122-8/+28
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix usage message, the executable is optional.mikeh2001-08-152-2/+2
| | | | | PR: bin/29735 MFC after: 2 weeks
* Remove whitespace at EOL.dd2001-07-151-3/+3
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Null terminate buffer.jlemon2001-06-071-1/+2
| | | | | | PR: 23150 Submitted by: Dan Nelson <dnelson@emsphone.com> MFC in: 1 week
* Fix minor style issue from previous commit.obrien2001-05-032-2/+2
|
* * include/elf.h has been repo copied to include/elf-hints.h, and it noobrien2001-05-023-3/+3
| | | | | | | | longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
* Compensate for header dethreading.markm2001-05-012-0/+2
|
OpenPOWER on IntegriCloud