root@kali:~/ohm/mem_region# gdb mem_region 
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mem_region...done.
(gdb) break mem_region.c :8
Breakpoint 1 at 0x69f: file mem_region.c, line 8.
(gdb) break mem_region.c :17
Breakpoint 2 at 0x6e7: file mem_region.c, line 17.
(gdb) run
Starting program: /root/ohm/mem_region/mem_region 

Breakpoint 1, add (a=1) at mem_region.c:8
8	    return b;
(gdb) print &my_global_var 
$1 = (int *) 0x555555755038 <my_global_var>
(gdb) print &b
$2 = (int *) 0x7fffffffe06c
(gdb) continue
Continuing.

Breakpoint 2, main () at mem_region.c:17
17	    printf("ptr[0] = %d, ptr[1] = %d, ptr[2] = %d\n", ptr[0], ptr[1], ptr[2]);
(gdb) print ptr
$3 = (int *) 0x555555756260
(gdb) print &ptr[0]
$4 = (int *) 0x555555756260
(gdb) print &ptr[1]
$5 = (int *) 0x555555756264
(gdb) print &ptr[2]
$6 = (int *) 0x555555756268
(gdb) 

