This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix PR 18208: update /proc/pid/coredump_filter by c code
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Yao Qi <qiyaoltc at gmail dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 07 May 2015 10:05:32 +0100
- Subject: Re: [rfc] Fix PR 18208: update /proc/pid/coredump_filter by c code
- Authentication-results: sourceware.org; auth=none
- References: <1429889336-12277-1-git-send-email-qiyaoltc at gmail dot com> <554A3D61 dot 8090302 at redhat dot com> <554A44B9 dot 3090503 at codesourcery dot com>
Luis Machado <lgustavo@codesourcery.com> writes:
>>> -# Get the inferior's PID.
>>> -set infpid ""
>>> gdb_test_multiple "info inferiors" "getting inferior pid" {
>>> - -re "process \($decimal\).*\r\n$gdb_prompt $" {
>>> - set infpid $expect_out(1,string)
>>> + -re "process $decimal.*\r\n$gdb_prompt $" {
>>> }
>>> -re "Remote target.*$gdb_prompt $" {
>>> # If the target does not provide PID information (like usermode QEMU),
>>
>> This "If the target does not provide PID information" check sounds
>> odd now. Do we still need it?
>
> If we're not dealing with PID's, i don't think so.
At the very start, I removed this block, but I recall that this block is
used as a guard for usermode QEMU which doesn't provide PID
information. With this patch applied, we'll access
/proc/self/coredump_filter, but I am afraid it doesn't work as expected
on usermode QEMU, because usermode QEMU just intercepts few /proc
accesses and pass most of them through the host linux. Accessing
/proc/QEMU_PID/coredump_filter isn't what we want in this test, so I
think it's better to skip the test for usermode QEMU.
Of course, I don't mind removing this block. Luis, could you try this
patch and remove this block, see whether it causes fails on usermode QEMU?
--
Yao (éå)