FP: Argument and type names for Linux?

11 views
Skip to first unread message

Bartłomiej Gajda

unread,
Jul 1, 2026, 5:55:47 PMJul 1
to Dr. Memory Users
Hi,
I've been building a Linux-main DynamoRIO/DrMemory tracer client, whose one of the task is logging syscalls using drsys_iterate_args() and noticed that drsys_arg_t.arg_name is always NULL for Linux syscalls, while Windows works much better. I think I understand why, and wanted to raise and discuss it before attempting a patch:

arg_name is only written at report_memarg_ex() in drsyscall/drsyscall.c, which is in turn reached from report_memarg_type(). On Windows, most NtXYZ syscalls have dedicated handlers, e.g. in drsyscall_windows.c. On Linux, we mostly rely on the static table in table_linux.c.
Furthermore, report_memarg_ex is only called for memory-referencing arguments. Inlined scalar args (fd, flags, counts, anything with SYSARG_INLINED) go through a completely separate path in the drsys_iterate_args() iterator that never calls report_memarg_ex, so arg_name is never set for them regardless of platform.

I think that a good solution would be to introduce a const char* arg_name field in sysinfo_arg_t from drsyscall_os.h - it already defines type_name, add arg->arg_name = sysinfo->arg[compacted].arg_name in the inline scalar branch and populate the field in table_linux.c for the syscalls that need it.
As I said, that's my first contribution to this framework, so I mightve missed something, but I'm willing to work on it
Greets, Bartek

Derek Bruening

unread,
Jul 7, 2026, 8:55:58 PMJul 7
to drmemor...@googlegroups.com
Thank you for your interest in contributing. Your plan sounds reasonable to me: happy to look at a pull request. Note that drsyscall was moved to the dynamorio repository as part of https://github.com/DynamoRIO/dynamorio/issues/7303 (drmemory still needs to be updated to use the new location and then remove it from the drmemory repository).

--

---
You received this message because you are subscribed to the Google Groups "Dr. Memory Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drmemory-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/drmemory-users/1538a759-74b7-471b-82a9-a51ffeb35dccn%40googlegroups.com.

Bartłomiej Gajda

unread,
Jul 17, 2026, 5:47:35 PM (12 days ago) Jul 17
to Dr. Memory Users
I've just created this issue on the DynamoRIO repo to get an branch name identifier. Right now, all existing arg entries in the main Linux table are filled. The next step is to add the remaining inlined arguments (I'm not sure if I'm planning to touch anything special-handled/unusual), as well as populating the new struct to the remaining tables (table_linux_ioctl.c, table_macos_bsd.c and most of the windows tables). This looks like a lot of work, I think that for the sole arg naming process I'll use some kind of an LLM and verify afterwards. You can track the current progress on my fork. Due to personal commitments, I'm taking a two-week-long break from intense contributing, but you can always discuss the changes here. 
Greetings, Bartek

Derek Bruening

unread,
Jul 17, 2026, 9:49:42 PM (12 days ago) Jul 17
to drmemor...@googlegroups.com
Remember that large PRs are difficult to review. Please send smaller incremental PRs if at all possible.

Reply all
Reply to author
Forward
0 new messages