Skip to content

getModulePath and paths with spaces #40

Closed
@starseeker

Description

Hi! I've hit a case where the sscanf used to parse the WAI_PROC_SELF_MAPS lines at whereami.c:361 winds up not getting a path that contains a space in the name (it comes from one of our test paths in our main build). Here's what shows in gdb:

(gdb) print (const char *)buffer
$1 = 0x7fffffff8870 "7ffff4c6c000-7ffff4d44000 r-xp 0006c000 103:03 4500978", ' ' <repeats 19 times>, "/home/user/brlcad/build/distcheck-odd_pathnames/1 Odd_ build dir ++/lib/libbu.so.20.0.1\n"
(gdb) print (const char *)path
$2 = 0x7fffffff9870 "/home/user/brlcad/build/distcheck-odd_pathnames/1"

Would it be possible to adjust this logic so the full path is returned in such cases?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions