Sponsored Content
Full Discussion: Stack Trace
Top Forums Shell Programming and Scripting Stack Trace Post 302817371 by DGPickett on Wednesday 5th of June 2013 04:05:39 PM
Old 06-05-2013
You lack an unpush if things go ok in the first leven N function and bad in the second level N function. You might put the message on the end of an exported env. variable in a subshell, so when you return it removes your addition.
Code:
#!/usr/bin/ksh
xxx(){
 ( a=$a/xxx 
 return 1 )
  return $!
}
a=
xxx
echo "xxx returns $?
a='$a'"
~
~
~
~
~
~
~
~
~
"funcewrite" 15 lines, 102 characters 
$ funcewrite    
xxx returns 1
a=''
$

This is much nicer in JAVA/C++ (Abstract Class method inheritance)! I wrote a similar bit for XML schema parse, where the containing element could call its parent first to print out his path, which rippled up to root where it started printing because there was no parent and then unrolled back printing each level to the original caller to print his bit last.
 

10 More Discussions You Might Find Interesting

1. Programming

Core file without a readable stack trace

I am using gdb to examine a core file but the output contains only the method addresses in hex. Is there anyway to translate these addresses to a human-readable form? :confused: (0 Replies)
Discussion started by: ciregbu
0 Replies

2. Programming

printing a stack trace with backtrace

I am trying to print a stack trace programatically using backtrace and backtrace_symbols. The problem is that the stack being printed in a mangled format. Is there a way to get the output in more of a human readable form? I am using Red Hat and the program is written in c++. (2 Replies)
Discussion started by: dmirza
2 Replies

3. Shell Programming and Scripting

Need to capture ERROR msg and stack trace

Hi all, I was hoping someone can point me in the right direction. I'm trying to filter out errors from a web log- any lines with ERROR in it. I know I could simply use the grep command to do this. However, there are times when a stack trace follows the error line. I would like to capture these... (2 Replies)
Discussion started by: gswhoops
2 Replies

4. UNIX for Advanced & Expert Users

help required - stack trace

Hi all, One of our programs written in Java, produced this logfile. This job runs 48 threads and only one thread failed with this error. The code is a blackbox(external product), so cant look at the source code. From what I can infer from the log, the job was trying to write the log messages into... (9 Replies)
Discussion started by: ranj@chn
9 Replies

5. Filesystems, Disks and Memory

get stack trace from C program on Solaris 8

I'm on solaris 8. I need to check the stack trace inside my C program. I don't have printstack or walkstack. I tested getcontext and it works. But how do I get the symbols from "stack_t" ? Help please. Many thanks! (4 Replies)
Discussion started by: rydahl
4 Replies

6. Solaris

Need to retrieve stack trace from core using mdb

Hello , I use Solaris 5.10 . I have huge core file , 48 GB , resulted from an application that was running and got crashed with SIGSEGV. On my system only mdb works. Please help me to retrieve the stack trace from this core file. I am novice to mdb and its nuaunces. Please help me with... (2 Replies)
Discussion started by: rmv
2 Replies

7. AIX

How to get the stack trace using kdb?

Hi All, I am trying to debug my core file using kdb. When I try to get the stack trace I am facing this error. core mapped from @ 700000000000000 to @ 70000000306fc04 Preserving 1680415 bytes of symbol table Dump does not start with valid magic number WARNING: Possibly truncated or... (2 Replies)
Discussion started by: Sachin1987
2 Replies

8. Programming

View Stack Trace of different cores

I have a C program which is running as daemon and has some threads. The program is running on dual core cpu and it may happen that different threads may run on different cpu core. The problem is sometimes it crashes with some heap memory corruption probably between threads. GDB command(t a a... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

9. Linux

Server hung, is this a stack trace?

Hi everyone, Our Red Hat server hung yesterday, and I managed to log into the console and see the following message: RIP: 0010: mwait_idle_with_hints+0x66/ 0x67 RSP: 0018:ffffffff80457f40 EFLAGS: 00000046 RAX: 0000000000000010 RBX: ffff810c20075910 RCX: 0000000000000001 RDX:... (6 Replies)
Discussion started by: badoshi
6 Replies

10. Shell Programming and Scripting

Java stack trace parser in awk

I want the developers to get a mail with Java stack traces on a daily bases. When something is flaged as known issue and will get a fix but mean while this does not need to get sent each dayl. This is what I got so far. It's a bash script that runs some AWK in it. To get the files that needs to... (6 Replies)
Discussion started by: chipmunken
6 Replies
Config::Model::AnyThing(3pm)				User Contributed Perl Documentation			      Config::Model::AnyThing(3pm)

NAME
Config::Model::AnyThing - Base class for configuration tree item VERSION
version 2.021 SYNOPSIS
# internal class DESCRIPTION
This class must be inherited by all nodes or leaves of the configuration tree. AnyThing provides some methods and no constructor. Introspection methods element_name() Returns the element name that contain this object. index_value() For object stored in an array or hash element, returns the index (or key) containing this object. parent() Returns the node containing this object. May return undef if "parent()" is called on the root of the tree. container_type() Returns the type (e.g. "list" or "hash" or "leaf" or "node" or "warped_node") of the element containing this object. root() Returns the root node of the configuration tree. location() Returns the node location in the configuration tree. This location conforms with the syntax defined by "grab()" method. composite_name Return the element name with its index (if any). I.e. returns "foo:bar" or "foo". Annotation Annotation is a way to store miscellaneous information associated to each node. (Yeah... comments) These comments will be saved outside of the configuration file and restored the next time the command is run. annotation( [ note1, [ note2 , ... ] ] ) Without argument, return a string containing the object's annotation (or an empty string). With several arguments, join the arguments with " ", store the annotations and return the resulting string. load_pod_annotation ( pod_string ) Load annotations in configuration tree from a pod document. The pod must be in the form: =over =item path Annotation text =back Information management grab(...) Grab an object from the configuration tree. Parameters are: "step" A string indicating the steps to follow in the tree to find the required item. (mandatory) "mode" When set to "strict", "grab" will throw an exception if no object is found using the passed string. When set to "adaptative", the object found at last will be returned. For instance, for the step "good_step wrong_step", only the object held by "good_step" will be returned. When set to "loose", grab will return undef in case of problem. (default is "strict") "type" Either "node", "leaf", "hash" or "list". Returns only an object of requested type. Depending on "strict" value, "grab" will either throw an exception or return the last found object of requested type. (optional, default to "undef", which means any type of object) "autoadd" When set to 1, "hash" or "list" configuration element are created when requested by the passed steps. (default is 1). grab_non_available When set to 1, grab will return an object even if this one is not available. I.e. even if this element was warped out. (default is 0). The "step" parameters is made of the following items separated by spaces: - Go up one node ! Go to the root node. !Foo Go up the configuration tree until the "Foo" configuration class is found. Raise an exception if no "Foo" class is found when root node is reached. xxx Go down using "xxx" element. xxx:yy Go down using "xxx" element and id "yy" (valid for hash or list elements) ?xxx Go up the tree until a node containing element "xxx" is found. Then go down the tree like item "xxx". If "?xxx:yy", go up the tree the same way. But no check is done to see if id "yy" actually exists or not. Only the element "xxx" is considered when going up the tree. grab_value(...) Like "grab(...)", but will return the value of a leaf or check_list object, not just the leaf object. Will raise an exception if following the steps ends on anything but a leaf or a check_list. grab_annotation(...) Like "grab(...)", but will return the annotation of an object. grab_root() Returns the root of the configuration tree. grab_ancestor( Foo ) Go up the configuration tree until the "Foo" configuration class is found. Returns the found node or undef. model_searcher () Returns an object dedicated to search an element in the configuration model (respecting privilege level). This method returns a Config::Model::SearchElement object. See Config::Model::Searcher for details on how to handle a search. dump_as_data ( ) Dumps the configuration data of the node and its siblings into a perl data structure. Returns a hash ref containing the data. See Config::Model::DumpAsData for details. warp_error Returns a string describing any issue with Config::Model::Warper object. Returns '' if invoked on a tree object without warp specification. AUTHOR
Dominique Dumont, (ddumont at cpan dot org) SEE ALSO
Config::Model, Config::Model::Instance, Config::Model::Node, Config::Model::Loader, Config::Model::Dumper perl v5.14.2 2012-11-09 Config::Model::AnyThing(3pm)
All times are GMT -4. The time now is 03:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy