Question: For a C function switcher with the general structure gcc generates the assembly code and jump table shown in Figure 3.24. Fill in the missing
For a C function switcher with the general structure

gcc generates the assembly code and jump table shown in Figure 3.24.
Fill in the missing parts of the C code. Except for the ordering of case labels C and D, there is only one way to fit the different cases into the template.
Figure 3.24

void switcher (long a, long b, long c, long *dest) { } long val; switch (a) { case case val = break; case case C = /* Fall through */ val = break; case val = break; default: val= /* Case A */ } *dest = val; /* Case B */ /* Case C */ /* Case D */ /* Case E */
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
The key to reverse engineering compiled switch statements is to combine the ... View full answer
Get step-by-step solutions from verified subject matter experts
