Support for adjusted switch-case values

Abierto
#4,753 0 comentarios 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Start from HLIL switch-case generation and review related issue #3776. Determine where the subtraction before the switch is represented, then make the adjusted case values appear directly in the output as shown; done means the generated HLIL is readable without the redundant subtraction.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Component: Core Core: HLIL Effort: Medium Impact: Medium

In the HLIL of the following code, the semantics of the output is correct, but it is not very readable. The code subtracts a char with 0x64 ('b'), and then do a switch case for value 0x0-0x11. It would be nice if we can remove the subtraction, and directly convert the switch-case values to 'b', etc

Screenshot 2023-11-15 at 6 01 21 PM

For example, to some code like this:

 switch ( prov[prov_i] )
    {
      case 'd':
        --flag_ck[ck_i];
        break;
      case 'e':
        if ( x <= 0 )
        {
          done = 1;
        }
        else if ( flag_ck[ck_i] <= 0 )

Related to https://github.com/Vector35/binaryninja-api/issues/3776

Lenguaje dominante
C++
Estrellas
1.3k
Forks
298
Merge medio
5 d 5 h
PR fusionados (30 d)
19

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Vector35/binaryninja-api

Todos los issues de Vector35/binaryninja-api

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.