From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24571 invoked by alias); 15 Jan 2014 16:53:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 24543 invoked by uid 48); 15 Jan 2014 16:52:59 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/16455] New: "set debug target" should not rewrite current_target Date: Wed, 15 Jan 2014 16:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00063.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16455 Bug ID: 16455 Summary: "set debug target" should not rewrite current_target Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: tromey at redhat dot com Currently, "set debug target" is implemented by rewriting current_target. This forces some of the target-squashing inheritance to remain in place -- at least for to_shortname, but perhaps other things as well. It would be better if "set debug target" were implemented as ordinary code in the various target API functions. That is, a macro like: #define target_post_attach(pid) \ (*current_target.to_post_attach) (¤t_target, pid) should be changed into an ordinary function definition that performs the method call and then checks "targetdebug". Many target functions already work this way, but not all. See also bug #8688. -- You are receiving this mail because: You are on the CC list for the bug.