As Andreas Løhre wrote:

> I have attached an strace for 4.6.3 (same behaviour as 4.7.2), but I won't
> be able to do the one for 4.7/4.4/4.5 before tomorrow.

Thanks to all who helped narrowing this down.

I could eventually reproduce it myself with a GCC 4.7, and then find
and fix it.

It's been a pointer aliasing problem.  The device parameter field was
filled in like:

  uchar *param, paramsize;

  ...
  {
    jtag3_device_desc_type d3;

    param = (uchar *)&d3;
    paramsize = sizeof d3;
    memset((void *)&d3, 0, sizeof d3);

    // fill in params here:
    d3.flash_size ...
    d3.flash_page_size

    ...
  }

  setJtagParameter(SCOPE_AVR, 2, PARM3_DEVICEDESC, param, paramsize);

GCC 4.7 decided that every assignment to d3 after the initial
memset() would result in values that are not used, as d3 was out
of scope at that point.  Thus, a null parameter block has been
sent.

Moving the definition of d3 to the next outer scope helped.

OK, I'd like to hear about any other issues people have with it ...
In case it dies after some debugging actions, it would be interesting
to see the -d trace of the actions taken.
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
avarice-user mailing list
avarice-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avarice-user

Reply via email to