Skip to main content
5 of 5
added 41 characters in body
Florin
  • 143
  • 1
  • 2
  • 8

Radare2 doesn't display the whole function

I am using radare2, I have disassembled the function: sym.loop, it contains a switch witch has 4 cases that calls different functions. After any of the function call, the program exits the loop function.

Here is my problem: after the first exit displayed in radare the disassembled code stops. I am not able to see the rest of the function's code, although there are jump indicating there is more content after the exit function.

Do I have to press or do anything to display the rest or is it a bug?

Here is the code of the loop function:

void loop(int a) {
    type[0] = a;
    while (true) {
        switch (type[0]) {
        case 1:
            function1(arg);
            break;
        case 2:
            function2(arg);
            break;
        case 3:
            function3(arg);
            break;
        default:
            printf("Command unrecognized.\n");
        case 4:
            function4();
            break;
        }
    }
}

Note: if there is any bug in the code, I may have caused trying to clean the code from debug messages or whatever... But the idea is that the main code has no bugs, it is just the disassembler that doesn't print the entire function. and the disassembly code stops after the case1's break (exit function).

(UPDATE:) Here is an example of the error I am talking about (not the above code, but the same error): Function is not displaying the entire code.No function return.

No return value is displayed.

Florin
  • 143
  • 1
  • 2
  • 8