VirtualBox

Changeset 91515 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 1, 2021 1:53:39 PM (3 years ago)
Author:
vboxsync
Message:

VBoxHeadless: bugref:9790 - Don't use builtin_return_address(1) in
the debug message. Newer compilers are unhappy about anything but the
immediate caller (i.e. non-zero arguments).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r89907 r91515  
    503503    const void * uCaller = __builtin_return_address(0);
    504504    if (dladdr(uCaller, &Info))
    505         cchMsg = snprintf(szMsg, sizeof(szMsg), "DEBUG: issetugid_for_AppKit was called by %p %s::%s+%p (via %p)\n",
    506                           uCaller, Info.dli_fname, Info.dli_sname, (void *)((uintptr_t)uCaller - (uintptr_t)Info.dli_saddr), __builtin_return_address(1));
     505        cchMsg = snprintf(szMsg, sizeof(szMsg), "DEBUG: issetugid_for_AppKit was called by %p %s::%s+%p\n",
     506                          uCaller, Info.dli_fname, Info.dli_sname, (void *)((uintptr_t)uCaller - (uintptr_t)Info.dli_saddr));
    507507    else
    508         cchMsg = snprintf(szMsg, sizeof(szMsg), "DEBUG: issetugid_for_AppKit was called by %p (via %p)\n", uCaller, __builtin_return_address(1));
     508        cchMsg = snprintf(szMsg, sizeof(szMsg), "DEBUG: issetugid_for_AppKit was called by %p\n", uCaller);
    509509    write(2, szMsg, cchMsg);
    510510    return 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette