Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb@sourceware.org>
Subject: RE: Go32-v2 native woes
Date: Tue, 06 Apr 2010 14:07:00 -0000	[thread overview]
Message-ID: <001501cad592$7ef11230$7cd33690$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <002a01cad517$d36eab90$7a4c02b0$@muller@ics-cnrs.unistra.fr>

  After some investigation, I find a fix for this,
I will send it to gdb-patches list.


Pierre Muller
Pascal language support maintainer for GDB



> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Pierre Muller
> Envoyé : Tuesday, April 06, 2010 1:29 AM
> À : gdb@sourceware.org
> Objet : Go32-v2 native woes
> 
>   There are again internal-error problems
> with go32v2 native about registers that are
> not correct.
> 
>   Current CVS gives this:
> 
> Breakpoint 2 at 0xc485: file ../../src/gdb/cli/cli-cmds.c, line 223.
> (top-gdb) set prompt top>
> #Note top> is an older gdb that works fine.
> top> r ./gdb
> Starting program: e:/cygwin/usr/local/src/gdbcvs/djcvsbuild/gdb/gdb.exe
> ./gdb
> GNU gdb (GDB) 7.1.50.20100405-cvs
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "--host=i586-pc-msdosdjgpp --target=djgpp".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> 
> Breakpoint 1, internal_error (
>     file=0xe6d70 "../../src/gdb/target-descriptions.c", line=1140,
>     string=0xe6d55 "%s: Assertion `%s' failed.") at
> ../../src/gdb/utils.c:1050
> 1050      va_start (ap, string);
> top> bt
> #0  internal_error (file=0xe6d70 "../../src/gdb/target-descriptions.c",
>     line=1140, string=0xe6d55 "%s: Assertion `%s' failed.")
>     at ../../src/gdb/utils.c:1050
> #1  0x000e8cf2 in tdesc_use_registers (gdbarch=0x46eda0,
> target_desc=0x3ed480,
>     early_data=0x46fd90) at ../../src/gdb/target-descriptions.c:1140
> #2  0x0013a17c in i386_gdbarch_init (info=..., arches=0x0)
>     at ../../src/gdb/i386-tdep.c:6699
> #3  0x0004dbd6 in gdbarch_find_by_info (info=...)
>     at ../../src/gdb/gdbarch.c:3979
> #4  0x00088785 in set_gdbarch_from_file (abfd=0x42c0a0)
>     at ../../src/gdb/arch-utils.c:552
> #5  0x00017c8b in exec_file_attach (filename=0x3eaeb8 "./gdb",
> from_tty=1)
>     at ../../src/gdb/exec.c:296
> #6  0x000256dd in catch_command_errors (command=0x179e7
> <exec_file_attach>,
>     arg=0x3eaeb8 "./gdb", from_tty=1, mask=6) at
> ../../src/gdb/exceptions.c:525
> #7  0x00002a2a in captured_main (data=0x3ea208) at
> ../../src/gdb/main.c:808
> #8  0x00025649 in catch_errors (func=0x1dfa <captured_main>,
>     func_args=0x3ea208, errstring=0x1b94 "", mask=6)
>     at ../../src/gdb/exceptions.c:510
> #9  0x00002d72 in gdb_main (args=0x3ea208) at ../../src/gdb/main.c:916
> #10 0x0000180d in main (argc=2, argv=0x3eaed8) at
> ../../src/gdb/gdb.c:33
> top> f 1
> #1  0x000e8cf2 in tdesc_use_registers (gdbarch=0x46eda0,
> target_desc=0x3ed480,
>     early_data=0x46fd90) at ../../src/gdb/target-descriptions.c:1140
> 1140      gdb_assert (VEC_length (tdesc_arch_reg, data->arch_regs) <=
> num_regs);
> 
> top> p num_regs
> $1 = 32
> top> p *data.arch_regs
> $2 = {num = 33, alloc = 36, vec = {{reg = 0x3ed6d8, type = 0x0}}}
> top>
> 
>   The additional reg in arch_regs seems to come from
> i386_validate_tdesc_p function:
>  /* Need to include %mxcsr, so add one.  */
>    num_regs += tdep->num_xmm_regs + 1;
> 
> Adding this condition
> if (tdep->num_xmm_regs)
> removes the problem above,
> but I get another error later:
> Breakpoint 1 at 0x479d: file ../../src/gdb/utils.c, line 1050.
> Breakpoint 2 at 0xc485: file ../../src/gdb/cli/cli-cmds.c, line 223.
> (top-gdb) start
> Temporary breakpoint 3 at 0x17d4: file ../../src/gdb/gdb.c, line 28.
> Starting program: e:/cygwin/usr/local/src/gdbcvs/djcvsbuild/gdb/gdb.exe
> 
> Temporary breakpoint 3, main (argc=1, argv=0x3eae78) at
> ../../src/gdb/gdb.c:28
> 28        memset (&args, 0, sizeof args);
> (top-gdb) inf reg
> eax            0x10     16
> ecx            0x0      0
> edx            0x100    256
> ebx            0x3f6    1014
> esp            0x3ea1f0 0x3ea1f0
> ebp            0x3ea220 0x3ea220
> esi            0x54     84
> edi            0x36a258 3580504
> eip            0x17d4   0x17d4 <main+28>
> eflags         0x3206   [ PF IF #12 #13 ]
> cs             0x28f    655
> ss             0x297    663
> ds             0x297    663
> es             0x297    663
> fs             0x2a7    679
> gs             0x2a7    679
> 
> Breakpoint 1, internal_error (file=0x1286ab "../../src/gdb/go32-nat.c",
>     line=546, string=0x128680 "Invalid register no. %d in
> fetch_register.")
>     at ../../src/gdb/utils.c:1050
> 1050      va_start (ap, string);
> 
>   GDB is trying to display register 32 which is normally "xmm0"
> and thus should not be displayed for go32v2.
> 
>   I was not able o fix that second problem :(
> 
> Pierre Muller
> Pascal language support maintainer for GDB
> and old-DOS lover ...



      reply	other threads:[~2010-04-06 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 23:29 Pierre Muller
2010-04-06 14:07 ` Pierre Muller [this message]

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='001501cad592$7ef11230$7cd33690$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=gdb@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