Moved the appending of '*'/'&' for pointer/reference parameters to the gcc 2
demangler, where it belongs. The gcc 4 stack traces look correct now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30955 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
15394881a8
commit
7927ebb672
@ -349,8 +349,8 @@ get_next_argument_internal(uint32* _cookie, const char* symbol, char* name,
|
||||
return B_LINK_LIMIT;
|
||||
|
||||
// it's a repeat case
|
||||
status_t status = get_next_argument_internal(&index, symbol, name,
|
||||
nameSize, _type, _argumentLength, true);
|
||||
status_t status = get_next_argument_internal(&index, symbol,
|
||||
name, nameSize, _type, _argumentLength, true);
|
||||
if (status == B_OK)
|
||||
(*_cookie)++;
|
||||
return status;
|
||||
@ -472,6 +472,14 @@ status_t
|
||||
get_next_argument_gcc2(uint32* _cookie, const char* symbol, char* name,
|
||||
size_t nameSize, int32* _type, size_t* _argumentLength)
|
||||
{
|
||||
return get_next_argument_internal(_cookie, symbol, name, nameSize, _type,
|
||||
_argumentLength, false);
|
||||
status_t error = get_next_argument_internal(_cookie, symbol, name, nameSize,
|
||||
_type, _argumentLength, false);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
// append the missing '*'/'&' for pointer/ref types
|
||||
if (name[0] != '\0' && (*_type == B_POINTER_TYPE || *_type == B_REF_TYPE))
|
||||
strlcat(name, *_type == B_POINTER_TYPE ? "*" : "&", nameSize);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
@ -204,10 +204,8 @@ print_demangled_call(const char* image, const char* symbol, addr_t args,
|
||||
kprintf("\33[34m%s\33[0m", value ? "true" : "false");
|
||||
break;
|
||||
default:
|
||||
if (buffer[0]) {
|
||||
kprintf("%s%s: ", buffer, type == B_POINTER_TYPE ? "*"
|
||||
: type == B_REF_TYPE ? "&" : "");
|
||||
}
|
||||
if (buffer[0])
|
||||
kprintf("%s: ", buffer);
|
||||
|
||||
if (length == 4) {
|
||||
value = *(uint32*)arg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user