History log of /haiku/src/bin/debug/strace/TypeHandler.h
Revision Date Author Comments
# 29f8da76 09-Jun-2023 Trung Nguyen <trungnt282910@gmail.com>

strace: Add mutex type

Added a dedicated mutex type handler that can print mutex status
flags while still showing the mutex address.

Change-Id: Ie028e5c0a336063a4c03a4f9adf955ffa6911837
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6557
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 17d9a20c 05-Jun-2023 Trung Nguyen <trungnt282910@gmail.com>

strace: Add support for struct sockaddr

- Updated old `sockaddr *` formatting code to work with current
`strace` structure.
- Add support for `AF_UNIX` family address.

Change-Id: I13f7b0a3eb913ab188bea68f8ea84e928b753154
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6497
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 7da3e2fc 28-Mar-2023 Augustin Cavalier <waddlesplash@gmail.com>

strace: Treat void** the same as addr_t*.

This way, the actual value pointed to will be printed, instead of
the pointer itself.


# 28d588d5 28-Mar-2023 Augustin Cavalier <waddlesplash@gmail.com>

strace: Create a status_t type handler and use it for return values.

This way, we save 3 string comparisons on every non-empty return value.

Actually this code was broken before, and did not print error names
for return types other than status_t, because message.return_value
is an unsigned integer and thus "< 0" was always false. Now we cast
appropriately in the new TypeHandler, so this works properly.


# 502309ab 27-Mar-2023 Augustin Cavalier <waddlesplash@gmail.com>

strace: Introduce FlagsTypeHandler, and use it for O_* modes.

Change-Id: I1569084a71c32834c0ff3d8dc71ef3de9d5a817d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6263
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Automation <automation@haiku-os.org>


# 36ef2106 03-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

strace: Add second entry in TypeHandler for const msghdr*.

This way sendmsg's argument will also be traced.

Change-Id: I40b44ffc732d884393f944bc2b1ced7b0a551287
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5354
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 8af65cc4 03-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

strace: Fix and enable tracing of msghdr structures.

Useful for sendmsg/recvmsg. However at present it only works for recvmsg,
as sendmsg's parameter is const, and this is not automatically matched.


# 1d2cf139 26-Apr-2022 Jérôme Duval <jerome.duval@gmail.com>

strace: trace fcntl and wait_for_child syscalls parameters

Change-Id: I774e8343139a2bdb3c2f60f37cab3a7207739c7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5251
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 39782e55 04-Dec-2021 Jérôme Duval <jerome.duval@gmail.com>

strace: support trace for poll() and select()

in the case of poll(), the events should be printed before the actual syscall,
and the revents after, while taking in account the return value.
thus B_DEBUGGER_MESSAGE_PRE_SYSCALL needs to be enabled and handled.
the attribute "preSyscall" is added to identify such syscalls, and the parameters
are identified with the attribute "inOut".

Change-Id: I390643ea176c720738c5ec4fc75a3a4c7125a3cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4763
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 8df6a8db 15-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved strace sourced to src/bin/debug/.
* Factored a few functions out of strace that can be reused.
* Added the beginnings of a "profile" command. It is very much work in
progress, though it is already able to profile the main thread of a
program.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27533 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8df6a8dbf579280f55b61d725e470dee5d504e83 15-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved strace sourced to src/bin/debug/.
* Factored a few functions out of strace that can be reused.
* Added the beginnings of a "profile" command. It is very much work in
progress, though it is already able to profile the main thread of a
program.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27533 a95241bf-73f2-0310-859d-f6bbb57e9c96