From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89222 invoked by alias); 22 Mar 2017 17:51:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 89166 invoked by uid 89); 22 Mar 2017 17:51:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=readline X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Mar 2017 17:51:30 +0000 Received: by simark.ca (Postfix, from userid 33) id 437F31E18C; Wed, 22 Mar 2017 13:51:30 -0400 (EDT) To: Simon Marchi Subject: Re: [PATCH] Remove some unnecessary inferior_ptid setting/restoring when fetching/storing registers X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 22 Mar 2017 17:51:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <20170322172919.26538-1-simon.marchi@ericsson.com> References: <20170322172919.26538-1-simon.marchi@ericsson.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.4 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00406.txt.bz2 On 2017-03-22 13:29, Simon Marchi wrote: > diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c > index efb3bd0b21..ae9b1411cf 100644 > --- a/gdb/sol-thread.c > +++ b/gdb/sol-thread.c > @@ -903,13 +897,9 @@ ps_err_e > ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, > const prgregset_t gregset) > { > - struct cleanup *old_chain; > - struct regcache *regcache; > - > - old_chain = save_inferior_ptid (); > - > - inferior_ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0); > - regcache = get_thread_arch_regcache (inferior_ptid, target_gdbarch > ()); > + ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0); > + struct regcache *regcache > + = get_thread_arch_regcache (ptid, target_gdbarch ()); > > supply_gregset (regcache, (const gdb_gregset_t *) gregset); > target_store_registers (regcache, -1); I actually tried to build sol-thread.o on Solaris and noticed I forgot to remove a "do_cleanups (old_chain);" just below here. I fixed it locally. I couldn't get the whole of GDB to build however: g++ -std=gnu++11 -g3 -O0 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Wno-deprecated-declarations -Werror -c -o i386-sol2-nat.o -MT i386-sol2-nat.o -MMD -MP -MF .deps/i386-sol2-nat.Tpo i386-sol2-nat.c In file included from /usr/include/sys/procfs.h:26:0, from i386-sol2-nat.c:23: /usr/include/sys/old_procfs.h:31:2: error: #error "Cannot use procfs in the large file compilation environment" #error "Cannot use procfs in the large file compilation environment" ^ gmake: *** [i386-sol2-nat.o] Error 1