Trying to see assembly code on Runtime
I would like to know if is it possible to see the assembly code of an App when executing. For example, execute gzip and see what it does when compressing a file. I mean, obtain a file with all the assembly code since gzip executes till it ends, in sequential order. I think this is not possible with modern processors due to OOOE, Prefetch, etc. So, what would be the best solution possible? GDB? DTrace? Or something else?
Thanks in Advance,