public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "hi-angel at yandex dot ru" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/17409] New: Built-in python doesn't see an arguments to the function
Date: Thu, 18 Sep 2014 14:00:00 -0000	[thread overview]
Message-ID: <bug-17409-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=17409

            Bug ID: 17409
           Summary: Built-in python doesn't see an arguments to the
                    function
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: minor
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: hi-angel at yandex dot ru

Python in a script don't see a transmitted arguments. Here's a test function:

define test
  p $arg0
python
print(str(gdb.parse_and_eval("$arg0")))
end
end

It takes one string as an argument, and just prints it at first from the
outside, and at second from within of a python block. But as the result instead
of a string you will see in second time «void».

A workaround for the present time is to assign $arg0 to something else. E.g. 

define test
  set $MyVar = $arg0
python
print(str(gdb.parse_and_eval("$MyVar")))
end
end

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From gdb-prs-return-16715-listarch-gdb-prs=sources.redhat.com@sourceware.org Thu Sep 18 14:56:36 2014
Return-Path: <gdb-prs-return-16715-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 10906 invoked by alias); 18 Sep 2014 14:56:36 -0000
Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-prs.sourceware.org>
List-Subscribe: <mailto:gdb-prs-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-prs/>
List-Post: <mailto:gdb-prs@sourceware.org>
List-Help: <mailto:gdb-prs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: gdb-prs-owner@sourceware.org
Delivered-To: mailing list gdb-prs@sourceware.org
Received: (qmail 10708 invoked by uid 48); 18 Sep 2014 14:56:33 -0000
From: "martin at minimum dot se" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/17384] android arm gdb "Cannot access memory at address"
 when I "stepi" over "blx"
Date: Thu, 18 Sep 2014 14:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: gdb
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: martin at minimum dot se
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:
Message-ID: <bug-17384-4717-OVjKlqEB8M@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-17384-4717@http.sourceware.org/bugzilla/>
References: <bug-17384-4717@http.sourceware.org/bugzilla/>
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-q3/txt/msg00704.txt.bz2
Content-length: 2169

https://sourceware.org/bugzilla/show_bug.cgi?id\x17384

--- Comment #17 from molsson <martin at minimum dot se> ---
The things that makes me believe that I do have symbols available is A) it says
"Yes" in the "Syms" column of the libblink_web.cr.so line in "info
sharedlibrary", also if I trace all executed commands during the build process
I can see that RenderFullscreen.cpp is built with "-g" parameter.

FWIW, the list of CFLAGS (I'm skipping a metric ton of -D and -I switches) is:

-fstack-protector --param=ssp-buffer-size=4 -Werror -fno-exceptions
-fno-strict-aliasing -Wall -Wno-unused-parameter
-Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC
-Wno-unused-local-typedefs -march=armv7-a -mtune=generic-armv7-a
-mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -fno-tree-sra -fno-partial-inlining
-fno-early-inlining -fno-tree-copy-prop -fno-tree-loop-optimize
-fno-move-loop-invariants -fno-caller-saves -Wno-psabi -mthumb-interwork
-ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums
-finline-limitd -Wa,--noexecstack
--sysroot=..../third_party/android_tools/ndk/platforms/android-14/arch-arm
-isystem..../third_party/android_tools/ndk/sources/cxx-stl/stlport/stlport -O0
-g -funwind-tables -fdiagnostics-color=always -fno-rtti -fno-threadsafe-statics
-fvisibility-inlines-hidden -Wsign-compare -Wno-c++0x-compat -Wno-abi
-std=gnu++11 -Wno-narrowing -Wno-literal-suffix

Notably, I'm also not passing -fomit-frame-pointer for this file at least (if I
grep for "omit-frame-pointer" I see several hits in the chromium tree but I'm
not sure which platforms or files etc use it).

Also, I can put a breakpoint on certain other functions like for example
base::debug::TaskAnnotator::RunTask() and there I can use "next" without
problems so there seems to be something special with
blink::RenderFullScreen::createPlaceholder() or possibly with one of the
functions it calls. Maybe something with inlining, or maybe because it's
static, not sure.

I will try to put some breakpoints near the unwind selection tomorrow and get
back with more info on that.

--
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2014-09-18 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 14:00 hi-angel at yandex dot ru [this message]
2022-06-06 23:19 ` [Bug python/17409] " tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-17409-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).