From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122490 invoked by alias); 30 Nov 2015 13:25:10 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 121068 invoked by uid 89); 30 Nov 2015 13:25:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f42.google.com Received: from mail-qg0-f42.google.com (HELO mail-qg0-f42.google.com) (209.85.192.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 30 Nov 2015 13:25:08 +0000 Received: by qgeb1 with SMTP id b1so117996606qge.1 for ; Mon, 30 Nov 2015 05:25:06 -0800 (PST) X-Received: by 10.140.235.212 with SMTP id g203mr29888480qhc.11.1448889906334; Mon, 30 Nov 2015 05:25:06 -0800 (PST) Received: from diogo-minilaptop ([177.63.110.140]) by smtp.googlemail.com with ESMTPSA id 63sm14824578qgl.31.2015.11.30.05.25.04 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Nov 2015 05:25:05 -0800 (PST) Message-ID: <1448889892.4187.8.camel@gmail.com> Subject: AVR debugging - Can't read io register contents From: Diogo Martins Silva To: gdb@sourceware.org Date: Mon, 30 Nov 2015 13:25:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00045.txt.bz2 Hello. I'm debugging an AVR software using an AVR Dragon - Avarice - avr-gdb - Eclipse Toolchain in Ubuntu 15.10, with current packages. While trying to read some register address (1284p's EICRA register at 0x69), I get all zeros. If I printf the register, the correct value is printed. I know to have successfully altered the register because the behavior of the micro changes accordingly. Funny thing is I can correctly read every other register. How do I pinpoint this? I'm not knowledgeable of gdb, so I appreciate your help. Diogo