delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/12/22/16:16:26

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Virus-Scanned: Debian amavisd-new at papyrus.altaweb.hu
Date: Sun, 22 Dec 2013 22:15:31 +0100
From: Levente Kovacs <leventelist AT gmail DOT com>
To: gEDA User Mailing List <geda-user AT delorie DOT com>
Subject: [geda-user] [off] GDB puzzle
Message-ID: <20131222221531.342add48@jive.levalinux.org>
Organization: logonex.eu
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Reply-To: geda-user AT delorie DOT com

Hi List,


I am coding some protocol, and when I want to print a value of a local
variable within GDB, I get this:

Cannot access memory at address 0x80000417caef

I found out that this happens when GDB wants to access a variable which is
out of the scope of the process. However, this is a local variable. When I
set the variable to static, it works. I compile the code with

-O0 -gstabs+ -g3 -Wall.

My gcc is

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)


My gdb is:

opyright (C) 2008 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-unknown-linux-gnu".


Any help appreciated!

Thank you,
Levente

-- 
Levente Kovacs
CTO, CSO
http://levente.logonex.eu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019