benfred / py-spy

Sampling profiler for Python programs
MIT License
12.89k stars 431 forks source link

Fix bug introduced by commit 5820bf6a7ef56718284add709bc56cc7b8cb6c16 #688

Closed jiangliu closed 1 month ago

jiangliu commented 1 month ago

Commit 5820bf6a7ef56718284add709bc56cc7b8cb6c16 removes field addr and size from BinaryInfo, which are used when feature unwind is enabled. So recover these two fields.

Fix building error: cargo build --all-features error[E0609]: no field addr on type &BinaryInfo --> src/binary_parser.rs:18:22 18 addr >= self.addr && addr < (self.addr + self.size) ^^^^ unknown field

= note: available fields are: symbols, bss_addr, bss_size

error[E0609]: no field addr on type &BinaryInfo --> src/binary_parser.rs:18:43 18 addr >= self.addr && addr < (self.addr + self.size) ^^^^ unknown field

= note: available fields are: symbols, bss_addr, bss_size

error[E0609]: no field size on type &BinaryInfo --> src/binary_parser.rs:18:55 18 addr >= self.addr && addr < (self.addr + self.size) ^^^^ unknown field

= note: available fields are: symbols, bss_addr, bss_size