Write bytes to stack memory and adjust the top of stack accordingly. Top of stack remains aligned to pointer size
(top: int, b: bytes)
| 276 | new_stack = stack_addr |
| 277 | |
| 278 | def __push_bytes(top: int, b: bytes) -> int: |
| 279 | """Write bytes to stack memory and adjust the top of stack accordingly. |
| 280 | Top of stack remains aligned to pointer size |
| 281 | """ |
| 282 | |
| 283 | data = b + b'\x00' |
| 284 | top = self.ql.mem.align(top - len(data), self.ql.arch.pointersize) |
| 285 | self.ql.mem.write(top, data) |
| 286 | |
| 287 | return top |
| 288 | |
| 289 | def __push_str(top: int, s: str) -> int: |
| 290 | """A convinient method for writing a string to stack memory. |