(
strings: Union[List[StackString], List[TightString]], console, verbose: bool, disable_headers: bool
)
| 202 | |
| 203 | |
| 204 | def render_stackstrings( |
| 205 | strings: Union[List[StackString], List[TightString]], console, verbose: bool, disable_headers: bool |
| 206 | ): |
| 207 | if verbose == Verbosity.DEFAULT: |
| 208 | for s in strings: |
| 209 | console.print(sanitize(s.string), markup=False) |
| 210 | else: |
| 211 | if strings: |
| 212 | table = Table( |
| 213 | "Function", |
| 214 | "Function Offset", |
| 215 | "Frame Offset", |
| 216 | "String", |
| 217 | show_header=not (disable_headers), |
| 218 | box=box.ASCII2, |
| 219 | show_edge=False, |
| 220 | ) |
| 221 | for s in strings: |
| 222 | table.add_row( |
| 223 | util.hex(s.function), |
| 224 | util.hex(s.program_counter), |
| 225 | util.hex(s.frame_offset), |
| 226 | string_style(sanitize(s.string)), |
| 227 | ) |
| 228 | |
| 229 | console.print(table) |
| 230 | |
| 231 | |
| 232 | def render_decoded_strings(decoded_strings: List[DecodedString], console, verbose, disable_headers): |
no test coverage detected