1. 17 9月, 2014 1 次提交
    • P
      kgdb: Remove first_entry for kgdb · f9f040b2
      Peng Fan 提交于
      There are two ways to run into handle_exception, run command 'kgdb' and
      encounter a breakpoint which triggers exception handling.
      
      The origin source code only saves regs when first run command 'kgdb'.
      Take the following for example, When run 'kgdb', regs is saved to entry_regs.
      When run 'bootz', regs is not saved. However, if we set a breakpoint, then
      continue. When breakpoint is reached, run `quit`, and Now return to the
      instruction which follows kgdb, but not bootz.This may cause errors. So,
      save regs for each handle_exception call to return to the correct place.
      Example:
      Target      |    Host
      =>kgdb      |    (gdb)b bootz
                  |    (gdb)c
      =>bootz     |
                  |    (gdb)Here stop because of breakpoint
                  |    (gdb)q
      Signed-off-by: NPeng Fan <van.freenix@gmail.com>
      f9f040b2
  2. 05 7月, 2010 1 次提交
    • W
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk 提交于
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      54841ab5
  3. 22 4月, 2010 1 次提交
  4. 18 1月, 2010 1 次提交
  5. 12 2月, 2009 1 次提交
  6. 28 1月, 2009 1 次提交
  7. 19 10月, 2008 1 次提交
  8. 09 3月, 2008 1 次提交
  9. 11 7月, 2007 1 次提交
  10. 09 7月, 2007 1 次提交
  11. 04 7月, 2007 1 次提交
  12. 13 10月, 2005 1 次提交
  13. 02 7月, 2003 1 次提交
  14. 28 6月, 2003 1 次提交
    • W
      * Code cleanup: · 8bde7f77
      wdenk 提交于
        - remove trailing white space, trailing empty lines, C++ comments, etc.
        - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
      
      * Patches by Kenneth Johansson, 25 Jun 2003:
        - major rework of command structure
          (work done mostly by Michal Cendrowski and Joakim Kristiansen)
      8bde7f77
  15. 27 8月, 2002 1 次提交