Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22454

Running objdump under docker shows different result

$
0
0

Assume this c code:

int main(){
 return 0;
}

Compiled using gcc under a normal running linux machine, and running objdump -d on the output shows the following:

00000000004004cd <main>:
  4004cd:   55                      push   %rbp
  4004ce:   48 89 e5                mov    %rsp,%rbp
  4004d1:   b8 00 00 00 00          mov    $0x0,%eax
...

I can easily set breakpoints in gdb using the 0x4004cd address.

Doing the same in a Docker container has weird memory addresses on the left (5fa) side and I can't breakpoint on them. Why is this happening?

00000000000005fa <main>:
 5fa:   55                      push   %rbp
 5fb:   48 89 e5                mov    %rsp,%rbp
 5fe:   b8 00 00 00 00          mov    $0x0,%eax

Viewing all articles
Browse latest Browse all 22454

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>