From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61602 invoked by alias); 10 Feb 2016 16:55:11 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 61581 invoked by uid 89); 10 Feb 2016 16:55:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 10 Feb 2016 16:55:10 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb/gdb-7.11-branch] Clear *VAL in regcache_raw_read_unsigned From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Message-Id: <83d9e733abe9cc0553f899064a955a6255550ade@gdb-build> Date: Wed, 10 Feb 2016 16:55:00 -0000 X-SW-Source: 2016-q1/txt/msg04944.txt.bz2 *** TEST RESULTS FOR COMMIT 83d9e733abe9cc0553f899064a955a6255550ade *** Author: Yao Qi Branch: gdb-7.11-branch Commit: 83d9e733abe9cc0553f899064a955a6255550ade Clear *VAL in regcache_raw_read_unsigned We have function regcache_raw_read_unsigned defined in both GDB and GDBserver, so that it is used in common like this, ULONGEST value; status = regcache_raw_read_unsigned (regcache, regnum, &value); 'value' is correctly set in GDB side, but may not be correctly set in GDBserver, because &value is passed in regcache_raw_read_unsigned but collect_register may only set part of the whole variable. In my test, I see the top half of 'value' is garbage. This patch fixes this problem by clearing *VAL before calling collect_register. gdb/gdbserver: 2016-02-10 Yao Qi * regcache.c (regcache_raw_read_unsigned): Clear *VAL.