decoder_aix.hpp revision 10061:197538942788
1139743Simp/*
243412Snewton * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
343412Snewton * Copyright (c) 2013 SAP SE. All rights reserved.
443412Snewton * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
543412Snewton *
643412Snewton * This code is free software; you can redistribute it and/or modify it
743412Snewton * under the terms of the GNU General Public License version 2 only, as
843412Snewton * published by the Free Software Foundation.
943412Snewton *
1043412Snewton * This code is distributed in the hope that it will be useful, but WITHOUT
1143412Snewton * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1243412Snewton * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1343412Snewton * version 2 for more details (a copy is included in the LICENSE file that
1443412Snewton * accompanied this code).
1543412Snewton *
1643412Snewton * You should have received a copy of the GNU General Public License version
1743412Snewton * 2 along with this work; if not, write to the Free Software Foundation,
1843412Snewton * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1943412Snewton *
2043412Snewton * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2143412Snewton * or visit www.oracle.com if you need additional information or have any
2243412Snewton * questions.
2343412Snewton *
2443412Snewton */
2543412Snewton
2643412Snewton#include "utilities/decoder.hpp"
2743412Snewton#include "porting_aix.hpp"
2843412Snewton
2943412Snewton// Provide simple AIXDecoder which enables decoding of C frames in VM.
3043412Snewtonclass AIXDecoder: public AbstractDecoder {
31101709Srwatson public:
32116174Sobrien  AIXDecoder() {
33116174Sobrien    _decoder_status = no_error;
34116174Sobrien  }
3543412Snewton  ~AIXDecoder() {}
36224778Srwatson
3743412Snewton  virtual bool can_decode_C_frame_in_vm() const { return true; }
3843412Snewton
3943412Snewton  virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle
4043412Snewton
4176166Smarkm  virtual bool decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) {
42141486Sjhb    return AixSymbols::get_function_name(addr, buf, buflen, offset, 0, demangle);
4343412Snewton  }
4476166Smarkm  virtual bool decode(address addr, char *buf, int buflen, int* offset, const void *base) {
4576166Smarkm    ShouldNotReachHere();
46164033Srwatson    return false;
4776166Smarkm  }
4876166Smarkm
49134266Sjhb};
5076166Smarkm
5143412Snewton