tud-zih-energy / lo2s

Linux OTF2 Sampling - A Lightweight Node-Level Performance Monitoring Tool
https://tu-dresden.de/zih/forschung/projekte/lo2s?set_language=en
GNU General Public License v3.0
45 stars 13 forks source link

libradare support broken #286

Closed cvonelm closed 11 months ago

cvonelm commented 1 year ago

Building lo2s with Radare2 (Version 5.8.2) results in the following build errors:

/home/cvonelm/lo2s/src/radare.cpp: In constructor ‘lo2s::Radare::Radare()’:
/home/cvonelm/lo2s/src/radare.cpp:30:30: error: ‘R_ASM_SYNTAX_ATT’ was not declared in this scope; did you mean ‘R_ARCH_SYNTAX_ATT’?
   30 |     r_asm_set_syntax(r_asm_, R_ASM_SYNTAX_ATT);
      |                              ^~~~~~~~~~~~~~~~
      |                              R_ARCH_SYNTAX_ATT
/home/cvonelm/lo2s/src/radare.cpp: At global scope:
/home/cvonelm/lo2s/src/radare.cpp:34:13: error: no declaration matches ‘std::string lo2s::Radare::single_instruction(char*)’
   34 | std::string Radare::single_instruction(char* buf)
      |             ^~~~~~
In file included from /home/cvonelm/lo2s/src/radare.cpp:22:
/home/cvonelm/lo2s/include/lo2s/radare.hpp:54:24: note: candidate is: ‘static std::string lo2s::Radare::single_instruction(std::byte*)’
   54 |     static std::string single_instruction(std::byte* buf);
      |                        ^~~~~~~~~~~~~~~~~~
/home/cvonelm/lo2s/include/lo2s/radare.hpp:41:7: note: ‘class lo2s::Radare’ defined here
   41 | class Radare
      |       ^~~~~~
/home/cvonelm/lo2s/src/radare.cpp: In member function ‘std::string lo2s::Radare::operator()(lo2s::Address, std::istream&)’:
/home/cvonelm/lo2s/src/radare.cpp:70:41: error: ‘struct r_asm_code_t’ has no member named ‘buf_asm’
   70 |     auto ret = single_instruction(code->buf_asm);
      |                                         ^~~~~~~

A quick look into the Radare source code reveals, that there were breaking changes to the API.