summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/ia64-fbsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright spelling.imp2010-03-101-1/+1
| | | | | PR: 139825 Submitted by: Ruslan Mahmatkhanov
* Correct off-by-one issue in truss(1) which happens when system call numberdelphij2009-05-281-1/+1
| | | | | | | | is nsyscalls. PR: bin/134916 Submitted by: Steven Hartland <steven hartland multiplay co uk> MFC after: 2 weeks
* Reduce diff against my local version: replace malloc+memset() cases to calloc().delphij2009-05-151-2/+1
|
* Add -c option to summarize number of calls, errors, and system time.dds2009-05-121-1/+2
| | | | Reviewed by: alfred
* MFp4: Bugfixes for truss(1):delphij2007-06-261-10/+6
| | | | | | | | | | | - Fix logic handling execve(). We will not be able to obtain information otherwise. - truss coredump [1]. - truss does not work against itself [2]. PR: bin/58970 [1], bin/45193 [2] Submitted by: Howard Su Approved by: re (kensmith)
* Make use of ptrace(2) instead of procfs in truss(1), eliminatingdelphij2007-04-101-30/+8
| | | | | | | | yet another need of an available /proc/ mount. Tested with: make universe Submitted by: howardsu Reviewed by: alfred
* - Fix crash when hitting unknown syscall. Copied from i386-fbsd.cpav2006-05-151-1/+2
| | | | Approved by: alfred
* Add a -s flag for the same functionality as strace. Introduce a Namebrian2006-01-021-2/+2
| | | | | | | | | | | | | | | | type which is a String type that has no -s limitations applied to it. Change most Strings in the code to Names and add a few extra syscalls, namely munmap, read, rename and symlink. This was enough to facilitate following file descriptor allocations in the code more easily and getting a hint at what's being read/written from/to files. More syscalls should really be added. While here, fix an off-by-one bug in the buffer truncation code and add a fflush so that truss's output reflects the syscall that the program is stuck in. Sponsored by: Sophos/Activestate MFC after: 2 weeks
* Support readlink(2) better. Readlink does not nul terminate thealfred2004-07-171-2/+2
| | | | | | | | result buffer, so we need to format it ourselves. The problem is that the length is stored as the return value from readlink, so we need to pass the return value from our syscall into print_arg. Motivated by: truss garbage on my screen from reading /etc/malloc.conf.
* Move declarations of Procfd to a header file.dwmalone2004-01-071-1/+0
|
* Port truss(1) to 64-bit architectures:marcel2003-11-091-12/+9
| | | | | | | | | | | | | | | | | | o Syscall return values do not fit in int on 64-bit architectures. Change the type of retval in <arch>_syscall_exit() to long and change the prototype of said function to return a long as well. o Change the prototype of print_syscall_ret() to take a long for the return address and change the format string accordingly. o Replace the code sequence tmp = malloc(X); sprintf(tmp, format, ...); with X by definition too small on 64-bit platforms by asprintf(&tmp, format, ...); With these changes the output makes sense again, although it does mess up the tabulation on ia64. Go widescreen... Not tested on: alpha, sparc64.
* Fix truss on ia64. The syscall arguments are written to the trapmarcel2003-08-021-17/+5
| | | | | | | | frame, occupying scratch registers r16 and up. We don't have to save any scratch registers for syscalls, so we have plenty of room there. Consequently, when we fetch the registers from the process, we automaticly have all the arguments and don't need to read them seperately.
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prime objectives are: o Implement a syscall path based on the epc inststruction (see sys/ia64/ia64/syscall.s). o Revisit the places were we need to save and restore registers and define those contexts in terms of the register sets (see sys/ia64/include/_regset.h). Secundairy objectives: o Remove the requirement to use contigmalloc for kernel stacks. o Better handling of the high FP registers for SMP systems. o Switch to the new cpu_switch() and cpu_throw() semantics. o Add a good unwinder to reconstruct contexts for the rare cases we need to (see sys/contrib/ia64/libuwx) Many files are affected by this change. Functionally it boils down to: o The EPC syscall doesn't preserve registers it does not need to preserve and places the arguments differently on the stack. This affects libc and truss. o The address of the kernel page directory (kptdir) had to be unstaticized for use by the nested TLB fault handler. The name has been changed to ia64_kptdir to avoid conflicts. The renaming affects libkvm. o The trapframe only contains the special registers and the scratch registers. For syscalls using the EPC syscall path no scratch registers are saved. This affects all places where the trapframe is accessed. Most notably the unaligned access handler, the signal delivery code and the debugger. o Context switching only partly saves the special registers and the preserved registers. This affects cpu_switch() and triggered the move to the new semantics, which additionally affects cpu_throw(). o The high FP registers are either in the PCB or on some CPU. context switching for them is done lazily. This affects trap(). o The mcontext has room for all registers, but not all of them have to be defined in all cases. This mostly affects signal delivery code now. The *context syscalls are as of yet still unimplemented. Many details went into the removal of the requirement to use contigmalloc for kernel stacks. The details are mostly CPU specific and limited to exception_save() and exception_restore(). The few places where we create, destroy or switch stacks were mostly simplified by not having to construct physical addresses and additionally saving the virtual addresses for later use. Besides more efficient context saving and restoring, which of course yields a noticable speedup, this also fixes the dreaded SMP bootup problem as a side-effect. The details of which are still not fully understood. This change includes all the necessary backward compatibility code to have it handle older userland binaries that use the break instruction for syscalls. Support for break-based syscalls has been pessimized in favor of a clean implementation. Due to the overall better performance of the kernel, this will still be notived as an improvement if it's noticed at all. Approved by: re@ (jhb)
* Fixed comment.ru2003-02-201-1/+1
|
* Port to ia64. It builds, but usability is very limited.marcel2002-11-101-0/+342
OpenPOWER on IntegriCloud