8297657: name demangling intermittently fails
Reviewed-by: stefank, coleenp
This commit is contained in:
parent
d20034b09c
commit
2bf7ac58b7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2013 SAP SE. All rights reserved.
|
* Copyright (c) 2013 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -29,9 +29,7 @@
|
|||||||
// Provide simple AIXDecoder which enables decoding of C frames in VM.
|
// Provide simple AIXDecoder which enables decoding of C frames in VM.
|
||||||
class AIXDecoder: public AbstractDecoder {
|
class AIXDecoder: public AbstractDecoder {
|
||||||
public:
|
public:
|
||||||
AIXDecoder() {
|
AIXDecoder() : AbstractDecoder(no_error) {}
|
||||||
_decoder_status = no_error;
|
|
||||||
}
|
|
||||||
virtual ~AIXDecoder() {}
|
virtual ~AIXDecoder() {}
|
||||||
|
|
||||||
virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle
|
virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -29,11 +29,9 @@
|
|||||||
|
|
||||||
#include "utilities/decoder.hpp"
|
#include "utilities/decoder.hpp"
|
||||||
|
|
||||||
// Just a placehold for now, a real implementation should derive
|
|
||||||
// from AbstractDecoder
|
|
||||||
class MachODecoder : public AbstractDecoder {
|
class MachODecoder : public AbstractDecoder {
|
||||||
public:
|
public:
|
||||||
MachODecoder() { }
|
MachODecoder() : AbstractDecoder(no_error) { }
|
||||||
virtual ~MachODecoder() { }
|
virtual ~MachODecoder() { }
|
||||||
virtual bool demangle(const char* symbol, char* buf, int buflen);
|
virtual bool demangle(const char* symbol, char* buf, int buflen);
|
||||||
virtual bool decode(address pc, char* buf, int buflen, int* offset,
|
virtual bool decode(address pc, char* buf, int buflen, int* offset,
|
||||||
|
@ -48,6 +48,8 @@ protected:
|
|||||||
decoder_status _decoder_status;
|
decoder_status _decoder_status;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
AbstractDecoder(decoder_status status) : _decoder_status(status) {}
|
||||||
|
|
||||||
virtual ~AbstractDecoder() {}
|
virtual ~AbstractDecoder() {}
|
||||||
|
|
||||||
// decode an pc address to corresponding function name and an offset from the beginning of
|
// decode an pc address to corresponding function name and an offset from the beginning of
|
||||||
@ -84,9 +86,7 @@ public:
|
|||||||
// Do nothing decoder
|
// Do nothing decoder
|
||||||
class NullDecoder : public AbstractDecoder {
|
class NullDecoder : public AbstractDecoder {
|
||||||
public:
|
public:
|
||||||
NullDecoder() {
|
NullDecoder() : AbstractDecoder(not_available) {}
|
||||||
_decoder_status = not_available;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~NullDecoder() {};
|
virtual ~NullDecoder() {};
|
||||||
|
|
||||||
|
@ -33,10 +33,8 @@
|
|||||||
class ElfDecoder : public AbstractDecoder {
|
class ElfDecoder : public AbstractDecoder {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ElfDecoder() {
|
ElfDecoder() : AbstractDecoder(no_error), _opened_elf_files(nullptr) {}
|
||||||
_opened_elf_files = nullptr;
|
|
||||||
_decoder_status = no_error;
|
|
||||||
}
|
|
||||||
virtual ~ElfDecoder();
|
virtual ~ElfDecoder();
|
||||||
|
|
||||||
bool demangle(const char* symbol, char *buf, int buflen);
|
bool demangle(const char* symbol, char *buf, int buflen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user