public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory
@ 2015-04-22 22:59 red.skotina at gmail dot com
  2015-04-22 23:01 ` [Bug breakpoints/18303] " red.skotina at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-04-22 22:59 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18303
           Summary: Assertation: -breakpoint-insert with windows paths of
                    file in non-current directory
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: red.skotina at gmail dot com

Overview: 

gdb crashed while trying insert breakpoint at file with windows paths if file
not exist in current directory

Steps to Reproduce:

gdb --batch --interpreter=mi2 -q -nx  -x mintest.mi

# mintest.mi
interpreter-exec mi "-file-exec-and-symbols --thread-group i1
pretty_printing_test.exe"
interpreter-exec mi "-break-insert -f -t main"
interpreter-exec mi "-exec-run"
interpreter-exec mi "-break-insert -f \"c:/uu.cpp:13\""

Actual Results:

c:\gdb79\bin>gdb --batch --interpreter=mi2 -q -nx  -x mintest.mi  
=thread-group-added,id="i1"
~"^done\n"
~"^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"0x00401545\",func=\"main(int,
char**)\",file=\"D:/code/testx/testx/pretty_printing_test/main.cpp\",fullname=\"D:\\\\code\\\\testx\\\\testx\\\\pretty_printing_test\\\\main.cpp\",line=\"15\",thread-groups=[\"i1\"],times=\"0\",original-location=\"main\"}\n"
=thread-group-started,id="i1",pid="1992"
=thread-created,id="1",group-id="i1"
~"~\"[New Thread 1992.0x1830]\\n\"\n"
~"^running\n"
~"*running,thread-id=\"all\"\n"
~"(gdb) \n"
=library-loaded,id="C:\\Windows\\SysWOW64\\ntdll.dll",target-name="C:\\Windows\\SysWOW64\\ntdll.dll",host-name="C:\\Windows\\SysWOW64\\ntdll.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\kernel32.dll",target-name="C:\\Windows\\syswow64\\kernel32.dll",host-name="C:\\Windows\\syswow64\\kernel32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\KernelBase.dll",target-name="C:\\Windows\\syswow64\\KernelBase.dll",host-name="C:\\Windows\\syswow64\\KernelBase.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\msvcrt.dll",target-name="C:\\Windows\\syswow64\\msvcrt.dll",host-name="C:\\Windows\\syswow64\\msvcrt.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="c:\\gdb79\\opt\\bin\\libgcc_s_sjlj-1.dll",target-name="c:\\gdb79\\opt\\bin\\libgcc_s_sjlj-1.dll",host-name="c:\\gdb79\\opt\\bin\\libgcc_s_sjlj-1.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="c:\\gdb79\\opt\\bin\\libwinpthread-1.dll",target-name="c:\\gdb79\\opt\\bin\\libwinpthread-1.dll",host-name="c:\\gdb79\\opt\\bin\\libwinpthread-1.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\TDM-GCC-64\\bin\\libstdc++-6.dll",target-name="C:\\TDM-GCC-64\\bin\\libstdc++-6.dll",host-name="C:\\TDM-GCC-64\\bin\\libstdc++-6.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\user32.dll",target-name="C:\\Windows\\syswow64\\user32.dll",host-name="C:\\Windows\\syswow64\\user32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\gdi32.dll",target-name="C:\\Windows\\syswow64\\gdi32.dll",host-name="C:\\Windows\\syswow64\\gdi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\lpk.dll",target-name="C:\\Windows\\syswow64\\lpk.dll",host-name="C:\\Windows\\syswow64\\lpk.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\usp10.dll",target-name="C:\\Windows\\syswow64\\usp10.dll",host-name="C:\\Windows\\syswow64\\usp10.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\advapi32.dll",target-name="C:\\Windows\\syswow64\\advapi32.dll",host-name="C:\\Windows\\syswow64\\advapi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\SysWOW64\\sechost.dll",target-name="C:\\Windows\\SysWOW64\\sechost.dll",host-name="C:\\Windows\\SysWOW64\\sechost.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\rpcrt4.dll",target-name="C:\\Windows\\syswow64\\rpcrt4.dll",host-name="C:\\Windows\\syswow64\\rpcrt4.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\sspicli.dll",target-name="C:\\Windows\\syswow64\\sspicli.dll",host-name="C:\\Windows\\syswow64\\sspicli.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\cryptbase.dll",target-name="C:\\Windows\\syswow64\\cryptbase.dll",host-name="C:\\Windows\\syswow64\\cryptbase.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\SysWOW64\\imm32.dll",target-name="C:\\Windows\\SysWOW64\\imm32.dll",host-name="C:\\Windows\\SysWOW64\\imm32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Windows\\syswow64\\msctf.dll",target-name="C:\\Windows\\syswow64\\msctf.dll",host-name="C:\\Windows\\syswow64\\msctf.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="c:\\ansicon\\ANSI32.dll",target-name="c:\\ansicon\\ANSI32.dll",host-name="c:\\ansicon\\ANSI32.dll",symbols-loaded="0",thread-group="i1"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00401545",func="main(int,
char**)",file="D:/code/testx/testx/pretty_printing_test/main.cpp",fullname="D:\\code\\testx\\testx\\pretty_printing_test\\main.cpp",line="15",thread-groups=["i1"],times="1",original-location="main"}
~"*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"1\",frame={addr=\"0x00401545\",func=\"main\",args=[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\"0x602c58\"}],file=\"D:/code/testx/testx/pretty_printing_test/main.cpp\",fullname=\"D:\\\\code\\\\testx\\\\testx\\\\pretty_printing_test\\\\main.cpp\",line=\"15\"},thread-id=\"1\",stopped-threads=\"all\"\n"
=breakpoint-deleted,id="1"
~"~\"cp-namespace.c:341: internal-error: cp_search_static_and_baseclasses:
Assertion `name[prefix_len + 1] == ':'' failed.\\nA problem internal to GDB has
been detected,\\nfurther debugging may prove unreliable.\\nQuit this debugging
session? \"\n"
~"~\"(y or n) [answered Y; input not from terminal]\\n\"\n"
~"&\"\\nThis is a bug, please report it.\"\n"
~"&\"  For instructions, see:\\n<http://www.gnu.org/software/gdb/bugs/>.\"\n"
~"&\"\\n\\n\"\n"
~"~\"cp-namespace.c:341: internal-error: cp_search_static_and_baseclasses:
Assertion `name[prefix_len + 1] == ':'' failed.\\nA problem internal to GDB has
been detected,\\nfurther debugging may prove unreliable.\\nCreate a core file
of GDB? \"\n"
~"~\"(y or n) [answered Y; input not from terminal]\\n\"\n"
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Expected Results:

~"&\"No source file named uu.cpp.\\n\"\n"
~"^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=
\"<PENDING>\",pending=\"uu.cpp:13\",times=\"0\",original-location=\"c:/uu.cpp:13\"}
\n"

Build Date & Hardware: 
Build 2015-22-04 on Windows 7 x64 (i686-mingw-w64)

Additional Information:
Probably gdb consider breakpoint argument be namespace instead file

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
@ 2015-04-22 23:01 ` red.skotina at gmail dot com
  2015-04-25 14:03 ` red.skotina at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-04-22 23:01 UTC (permalink / raw)
  To: gdb-prs

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

RedSkotina <red.skotina at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i686-w64-mingw32
                 CC|                            |red.skotina at gmail dot com
               Host|                            |i686-w64-mingw32
              Build|                            |i686-w64-mingw32

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
  2015-04-22 23:01 ` [Bug breakpoints/18303] " red.skotina at gmail dot com
@ 2015-04-25 14:03 ` red.skotina at gmail dot com
  2015-04-25 14:07 ` red.skotina at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-04-25 14:03 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from RedSkotina <red.skotina at gmail dot com> ---
problem in linespec.c:2288
       else
    {
      /* No symtabs found -- discard user_filename.  */
      xfree (user_filename);

      /* A NULL entry means to use GLOBAL_DEFAULT_SYMTAB.  */
      VEC_safe_push (symtab_ptr, PARSER_RESULT (parser)->file_symtabs, NULL);
    }

need consume token for parse the rest of linespec or rethrow error. i dont so
familiar with code of gdb for choose best solution. 
//replace 
//linespec.c:2288
else
{
    /* No symtabs found -- discard user_filename.  */
    xfree (user_filename);

   /* A NULL entry means to use GLOBAL_DEFAULT_SYMTAB.  */
   VEC_safe_push (symtab_ptr, PARSER_RESULT (parser)->file_symtabs, NULL);

   /* Get the next token.  */
   token = linespec_lexer_consume_token (parser);

   /* This is LSTOKEN_COLON; consume it.  */
   linespec_lexer_consume_token (parser);
}

OR
//linespec.c:2288
else
{
   size_t MAX_PATH = 260;
   char user_filename_temp_copy[MAX_PATH];
   snprintf(user_filename_temp_copy,MAX_PATH,"%s",user_filename);
   throw_error (NOT_FOUND_ERROR, _("No source file named %s."),
user_filename_temp_copy);
}

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
  2015-04-22 23:01 ` [Bug breakpoints/18303] " red.skotina at gmail dot com
  2015-04-25 14:03 ` red.skotina at gmail dot com
@ 2015-04-25 14:07 ` red.skotina at gmail dot com
  2015-05-02  7:38 ` red.skotina at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-04-25 14:07 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from RedSkotina <red.skotina at gmail dot com> ---
i miss free user_filename

//linespec.c:2288
else
{
      size_t MAX_PATH = 260;
      char user_filename_temp_copy[MAX_PATH];
      snprintf(user_filename_temp_copy,MAX_PATH,"%s",user_filename);
      /* No symtabs found -- discard user_filename.  */
      xfree (user_filename);
      throw_error (NOT_FOUND_ERROR, _("No source file named %s."),
user_filename_temp_copy);
}

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
                   ` (2 preceding siblings ...)
  2015-04-25 14:07 ` red.skotina at gmail dot com
@ 2015-05-02  7:38 ` red.skotina at gmail dot com
  2015-05-02 12:57 ` red.skotina at gmail dot com
  2015-08-06 18:01 ` sliwa at ifpan dot edu.pl
  5 siblings, 0 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-05-02  7:38 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from RedSkotina <red.skotina at gmail dot com> ---
Created attachment 8297
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8297&action=edit
patch for fix problem with update childrens of dynamic varobj

experienced gdb developers must test this patch
(warning: nonfullverified, brutforce method)

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
                   ` (3 preceding siblings ...)
  2015-05-02  7:38 ` red.skotina at gmail dot com
@ 2015-05-02 12:57 ` red.skotina at gmail dot com
  2015-08-06 18:01 ` sliwa at ifpan dot edu.pl
  5 siblings, 0 replies; 7+ messages in thread
From: red.skotina at gmail dot com @ 2015-05-02 12:57 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from RedSkotina <red.skotina at gmail dot com> ---
sor for missclick. this patch for bug #18332

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug breakpoints/18303] Assertation: -breakpoint-insert with windows paths of file in non-current directory
  2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
                   ` (4 preceding siblings ...)
  2015-05-02 12:57 ` red.skotina at gmail dot com
@ 2015-08-06 18:01 ` sliwa at ifpan dot edu.pl
  5 siblings, 0 replies; 7+ messages in thread
From: sliwa at ifpan dot edu.pl @ 2015-08-06 18:01 UTC (permalink / raw)
  To: gdb-prs

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

Cezary Śliwa <sliwa at ifpan dot edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sliwa at ifpan dot edu.pl

--- Comment #5 from Cezary Śliwa <sliwa at ifpan dot edu.pl> ---
This occurs also on x86_64-w64-mingw32 (Windows 7 64-bit) with gdb 7.9.1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From gdb-prs-return-18455-listarch-gdb-prs=sources.redhat.com@sourceware.org Thu Aug 06 18:07:05 2015
Return-Path: <gdb-prs-return-18455-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 86015 invoked by alias); 6 Aug 2015 18:07:05 -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 85980 invoked by uid 48); 6 Aug 2015 18:07:04 -0000
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/18779] collection of issues handling C strings in python
Date: Thu, 06 Aug 2015 18:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: python
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dje at google dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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-18779-4717-rimm5Eti2h@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-18779-4717@http.sourceware.org/bugzilla/>
References: <bug-18779-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: 2015-q3/txt/msg00159.txt.bz2
Content-length: 588

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

--- Comment #1 from dje at google dot com ---
bug #5:

(gdb) py print gdb.parse_and_eval("&string[0]").lazy_string().value()
104 'h'

I expected "hello".
The type of the result of LazyString.value() is a gdb Value, can't change that.
We could return an array of 5 (or 6) characters,
but we'd also want to make sure our handling of arrays of chars
is correct if we decide that.

At the least, we shouldn't be returning a gdb.Value object of the char 'h'.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-06 18:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22 22:59 [Bug breakpoints/18303] New: Assertation: -breakpoint-insert with windows paths of file in non-current directory red.skotina at gmail dot com
2015-04-22 23:01 ` [Bug breakpoints/18303] " red.skotina at gmail dot com
2015-04-25 14:03 ` red.skotina at gmail dot com
2015-04-25 14:07 ` red.skotina at gmail dot com
2015-05-02  7:38 ` red.skotina at gmail dot com
2015-05-02 12:57 ` red.skotina at gmail dot com
2015-08-06 18:01 ` sliwa at ifpan dot edu.pl

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).